Title: adsTringId Not defined
Last modified: March 3, 2022

---

# adsTringId Not defined

 *  Resolved [jonathanrich](https://wordpress.org/support/users/jonathanrich/)
 * (@jonathanrich)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadstringid-not-defined%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [sarathkumarrajendran](https://wordpress.org/support/users/sarathkumarrajendran/)
 * (@sarathkumarrajendran)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15434369)
 * Hi [@jonathanrich](https://wordpress.org/support/users/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](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.
 *  Thread Starter [jonathanrich](https://wordpress.org/support/users/jonathanrich/)
 * (@jonathanrich)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15434426)
 * 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](https://wordpress.org/support/users/sarathkumarrajendran/)
 * (@sarathkumarrajendran)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15438111)
 * Hi [@jonathanrich](https://wordpress.org/support/users/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](http://prntscr.com/cGbzXFbQCkBj)
 *  Thread Starter [jonathanrich](https://wordpress.org/support/users/jonathanrich/)
 * (@jonathanrich)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15438306)
 * Hi [@sarathkumarrajendran](https://wordpress.org/support/users/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](https://wordpress.org/support/users/sarathkumarrajendran/)
 * (@sarathkumarrajendran)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15450170)
 * Hi [@jonathanrich](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/enhanced-e-commerce-for-woocommerce-store/assets/icon-256x256.
   gif?rev=2708061)
 * [Conversios: Google Analytics (GA4), Google Ads, Conversion and Analytics Tracking for Multi-Channels](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [sarathkumarrajendran](https://wordpress.org/support/users/sarathkumarrajendran/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/adstringid-not-defined/#post-15450170)
 * Status: resolved