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

[Bug] Google Ads: Conversion Tag prevents debugger from showing Tag/Triggers correctly #874

Open
goochj03 opened this issue Sep 4, 2024 · 6 comments

Comments

@goochj03
Copy link

goochj03 commented Sep 4, 2024

In Matomo cloud, when creating a Tag type of Google Ads: Conversion, if the Trigger for this Tag is set to 'Page View' and that same Trigger is used by another Tag already, the preview tool seems to not display correctly.

Tag Type:
image

For example, the below Tags both share the same 'Page View' trigger.
image

When using the debugger tool, no Tags or Triggers are shown.
image

If a separate page view trigger is created and assigned to the Google Ads: Conversion Tag, the debugger then loads correctly.
image

image

@snake14
Copy link
Contributor

snake14 commented Sep 4, 2024

Hi @goochj03 . Thank you for taking the time to create this issue and providing good image examples. I was able to reproduce the issue and noticed an error in the JS Console:
image

That made me think of the warning that the tag was dependent on gtag.js:
image

I configured a tag of that type, on the same Pageview trigger:
image

Once that was done, things started working again and all of the tags executed as expected.

@AltamashShaikh
Copy link
Contributor

@Stan-vw @snake14 We had this description, when we created the tag, but we no more show any inline help for the description and hence it lead to this issue, may be we should mention as an inlineHelp in the name for now ?

"GoogleAdsConversionTagDescription": "Send an event to track conversions. This tag requires Google Tag (gtag.js) tag to be configured.",

@Stan-vw
Copy link

Stan-vw commented Sep 5, 2024

I think it's pretty easy to miss the text about the requirement at the moment, as it's only shown as a subtitle in the one-off creation process.

To solve this lack of clarity, maybe we should

  1. add it as an inline helptext in the create/edit screen (as @AltamashShaikh suggests), and
  2. add a yellow/red banner on the container dashboard & manage tags screens when someone has the Google Ads Conversion tag but not the required Google Tag to make it work. That way, even when they're not in a create/edit screen, they will see what is wrong with their setup.

@AltamashShaikh what do you think, is that a good solution or do you see better solutions?

@AltamashShaikh
Copy link
Contributor

@Stan-vw We just discussed this and we should add the description as inlineHelp and we should check if gtag is defined so that, no error is thrown and the code works as expected.

@9joshua
Copy link

9joshua commented Oct 3, 2024

@goochj03 I just saw this with another user even though they added the gtag.js script. This is because the Google Ads Conversion tag fired before their gtag script had initialised. Adding a 1 second 'Fire delay' to the tag solved this issue.

@AltamashShaikh
Adding this prior to calling the gtag() function might be a solution?...

  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

without this:

image

with:

image

@AltamashShaikh
Copy link
Contributor

@9joshua Thanks for the suggestion, we can check if adding window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} is better in comparison to check if gtag is defined, during the fix.

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

No branches or pull requests

5 participants