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

Google analytics tag manger return multiple of GA-ID #1452

Closed
3 tasks done
DoHaiSon opened this issue May 26, 2023 · 1 comment
Closed
3 tasks done

Google analytics tag manger return multiple of GA-ID #1452

DoHaiSon opened this issue May 26, 2023 · 1 comment

Comments

@DoHaiSon
Copy link
Contributor

DoHaiSon commented May 26, 2023

Acknowledge the following

  • I carefully read and followed the Getting Started guide.
  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • The issue I am raising is a potential bug in al-folio and not just a usage question.
    [For usage questions, please post in the Discussions instead of raising an issue.]

Describe the bug
Hi there, this is not a bug of al-folio, but I want to know what happened with my Google Analytics.
The bellow script corresponds to my GA id:

src="https://www.googletagmanager.com/gtag/js?id=G-F4TYWWTYBS"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-F4TYWWTYBS');
</script>

For sure, I checked it's correct. But the returned values of this API: https://www.googletagmanager.com/gtag/js?id=G-F4TYWWTYBS is a list of GA ids. So, the below GA IDs are added to the pages of my website:

<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=G-9ZS5RQLF5L&amp;l=dataLayer&amp;cx=c"></script>
<script type="text/javascript" async="" src="https://www.googletagmanager.com/gtag/js?id=UA-218922207-1&amp;l=dataLayer&amp;cx=c"></script>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-F4TYWWTYBS"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-F4TYWWTYBS');
</script>

I checked that UA-218922207-1 and G-9ZS5RQLF5L are two different GA-ids in my GA account, but I don't want them to be here.
Because the analytics are randomly separated into 3 IDs above.
For example, any traffic to this page: https://dohaison.github.io/InSI/, is pushed into this ID: UA-218922207-1.
And the rest of the traffic to https://dohaison.github.io/ is randomly pushed into G-F4TYWWTYBS and G-9ZS5RQLF5L.

I tried removing both ID UA-218922207-1 and G-9ZS5RQLF5L from GA, but the googletagmanager API still returned them.

Expected behavior
Just use 1 GA ID for everything.

Thank everyone for reading!!

@stale
Copy link

stale bot commented Sep 3, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 3, 2023
@stale stale bot closed this as completed Sep 11, 2023
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

2 participants