localgovdrupal / docs

Documentation for all projects around LocalGovDrupal.
https://trusting-noyce-aebebc.netlify.app/
GNU General Public License v2.0
6 stars 19 forks source link

Added GA4 code snippet #155

Closed stephen-cox closed 1 year ago

stephen-cox commented 1 year ago

Fixes #148

netlify[bot] commented 1 year ago

Deploy Preview for inspiring-euclid-d918c8 ready!

Name Link
Latest commit 510dba5f450da5cc198336f4395660507f716940
Latest deploy log https://app.netlify.com/sites/inspiring-euclid-d918c8/deploys/639c8ad904582f000910ace1
Deploy Preview https://deploy-preview-155--inspiring-euclid-d918c8.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

MichaelDCR commented 1 year ago

Hi @stephen-cox it looks good debug of analytics tracking fails, but that may be for various reasons - if you deploy it then I can test properly

stephen-cox commented 1 year ago

@MichaelDCR This has been merged and deployed to the live site

MichaelDCR commented 1 year ago

Hi @stephen-cox it's not working.

In debug the the Google Tag is found for the correct property, but no hits are being sent to analytics.

Inspector shows the tag in Sources too.

Not seen this before. Could be a Vuepress thing. Not sure how to debug further.

stephen-cox commented 1 year ago

The script is loading, but it's not setting cookies. Will need to investigate.

stephen-cox commented 1 year ago

I found a typo in the code I was adding to the page. GA cookies are now being set.

@MichaelDCR Is this now working for you?

MichaelDCR commented 1 year ago

Thanks @stephen-cox

I can see data now (although it seems to have disappeared for the main site, which makes no sense and is probably some weird GA4 time delay bug) so reckon all is good