Avinash Naidu
Avinash Naidu

Reputation: 11

Hotjar survey via javascript trigger with Google Tag manager not loading on first history change

I have a sharetribe react application which has google tag manager implemented.

Have added the Google Tag Manager tag below to be triggered on all history changes. hj('trigger', 'listing_upload_canceled') Tag Config Image

When When I test it out on Tag Manager Preview, I and change the page on my single page application I can see that the tag is fired successfully, but the hj survey doesn't load.

When I click on the same navigation option and a second history event occurs the survey will load. When I load refresh the page entirely as well the survey will load. It seems to be ignoring the first pushstate history change when I visit any path of my react app but will load the survey on the second pushstate history change.

Upvotes: 1

Views: 1102

Answers (0)

Related Questions