• Resolved jonathanrich

    (@jonathanrich)


    Hi, we are getting a JS error: Uncaught ReferenceError: adsTringId is not defined
    We believe this is caused by your plugin. The plugin is up-to-date with version 4.6.5. Any help would be gratefully appreciated. Many thanks.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support sarathkumarrajendran

    (@sarathkumarrajendran)

    Hi @jonathanrich

    We have added the JS variable “adsTringId” by using WordPress “wp_head” hook function.

    However, in the source code ( https://www.studmarc.com/product/bar-studs-20mm) we are not able to find the JS variable.

    This could be the reason our plugin is unable to find the same.

    Thread Starter jonathanrich

    (@jonathanrich)

    Thanks for your reply. The wp_head hook is being called in the header.php template. If this was not the case the site wouldn’t be working as the majority of the header code is rendered through this hook. This makes me think that something else is causing the issue. In your code, it looks like there is a condition statement before the variable is rendered out. Specifically:

    if (is_admin() || $this->ga_ST == "" || current_user_can("manage_options") || !$this->ga_PrivacyPolicy) {
       return;
    }

    Could it be that it is not getting passed this point?

    Plugin Support sarathkumarrajendran

    (@sarathkumarrajendran)

    Hi @jonathanrich

    The highlighted code is validated only to stop the tracking for users like WordPress admin-level and to manage the options.

    However, I would request to confirm if the option (attached in the screenshot) is enabled in the plugin settings at the time of onboarding.

    Here is the screenshot for your reference.

    https://prntscr.com/cGbzXFbQCkBj

    Thread Starter jonathanrich

    (@jonathanrich)

    Hi @sarathkumarrajendran

    That fixed the issue. However I would expect that not having that option checked shouldn’t cause a JS error as it’s stopping other JS from working on the page.

    Thanks

    Plugin Support sarathkumarrajendran

    (@sarathkumarrajendran)

    Hi @jonathanrich

    Please help with the screenshots of the JS that are getting impacted due to this issue, to dive in further.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘adsTringId Not defined’ is closed to new replies.