Site logo

Archived topic

Error Theme

8 replies · Started by mad2toi on May 10, 2022

Viewing posts 1–9 of 9

Hi,

My theme has this error :

Uncaught ReferenceError: your_user_id is not defined
at <anonymous>:2:14
at (index):3:5342
at new Promise (<anonymous>)
at RocketLazyLoadScripts._transformScript ((index):3:5034)
at async RocketLazyLoadScripts._loadScriptsFromList ((index):3:5435)
at async RocketLazyLoadScripts._loadEverythingNow ((index):3:4241)

Thank you for your help.

Hi there,

that error looks related to the WP Rocket plugin, and i assume it is related to Logged In user caches.
Is the error there when you're logged out of your site ?

Hi,

I disabled the plugin and I still get this error:

(index):151 Uncaught ReferenceError: your_user_id is not defined
at (index):151:14

If i check your sites source code, i see this in the <head> of your site:

<script>
var userId = your_user_id || null; // Replace your_user_id with your own if available.
window.hj('identify', userId, {
    // Add your own custom attributes here. Some EXAMPLES:
    // 'Signed up': '2019—06-20Z', // Signup date in ISO-8601 format.
    // 'Last purchase category': 'Electronics', // Send strings with quotes around them.
    // 'Total purchases': 15, // Send numbers without quotes.
    // 'Last purchase date': '2019-06-20Z', // Send dates in ISO-8601 format.
    // 'Last refund date': null, // Send null when no value exists for a user.
});
</script>

Have you added that code using a GP Hook or a function or a plugin ?

Yes with hotjar

Ok - so you need to check with hotjar as to what needs changing in that script.

Thank you

You're welcome

This archived topic is closed to new replies.