Hi @jonathanrich
We have added the JS variable “adsTringId” by using WordPress “wp_head” hook function.
However, in the source code ( http://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.
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?
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.
http://prntscr.com/cGbzXFbQCkBj
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
Hi @jonathanrich
Please help with the screenshots of the JS that are getting impacted due to this issue, to dive in further.