Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating Google Tag Manager (gtm) #8691

Closed
patricksebastien opened this issue Feb 15, 2017 · 7 comments
Closed

Integrating Google Tag Manager (gtm) #8691

patricksebastien opened this issue Feb 15, 2017 · 7 comments

Comments

@patricksebastien
Copy link

patricksebastien commented Feb 15, 2017

  • Electron version: 1.4.12
  • Operating system: Mac, Windows, Linux

Expected behavior

Collecting the analytics

Actual behavior

Not sending the datas to Google Analytics

How to reproduce

I have a simple webpage that integrates Google Tag Manager (a container that forward the dataLayer to Google Analytics). It works when opening my webpage on my local server, but when running the exact same code in electron, http://www.google-analytics.com/collect is never called.

I was wondering if anyone have a clue of why it is happening?
Thank you

@MarshallOfSound
Copy link
Member

Hey, Google Analytics doesn't work by default from file:// URL's. You either need to use HTTP or a custom protocol or use the universal-analytics package that can send requests directly to Google Analytics.

If you have other questions / issues about this please ask them below on this thread 👍

@apasternack
Copy link

@MarshallOfSound Does this mean that Google Tag Manager cannot be made to work with electron? Or might a workaround be possible to adapt it to the file protocol?

@evan-coygo
Copy link

I've got the same question, is there any way to use GTM within an Electron app? @apasternack did you ever figure this out?

@haneepark
Copy link

For those who are seeking for the answer, please find the workaround on this post:
Run Google Tag Manager And Google Analytics In Local Files

Works perfect for me.

@prameshbajra
Copy link

Hi @hanee24 ,
Is it possible for you to verify if this still is relevant? I am not able to get it running from electron.
:(

@leohxj
Copy link

leohxj commented Oct 13, 2022

"Universal Analytics will no longer process new data in standard properties beginning 1 July 2023. Prepare now by setting up and switching over to a Google Analytics 4 property."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants