0

I am having some trouble with setting up tracking in GTM. The tag i have create doesn't fire, when someone sends us an mail.

I want to track, how many mails are sent from a contact form within a iframe on my site. The mail-form is provide by the our CMS system, and i have access to the source of that iframe.

My setup in GTM looks like this:

Trigger configuration
Triggertype: Formular sent
Wait for tags 2000 milliseconds
Check to validate

Page path: contains contact-us

Click id: listform3883_sendbutton

Tag configuration
Tag type: Google Analytics - Universal Analytics
Tracking tyoe: event
Categories: Sent mail 
Label: {{ Form ID }}
{{Google Analytics - UA }}
eisbehr
  • 11,374
  • 7
  • 30
  • 56
Whap
  • 1

1 Answers1

0

The important aspect here is whether or not the iframe is on the same domain:

  • If it's not: you cannot interact with it from the parent page due to security reasons, so you will need GTM to be installed on the iframe page itself (ie the iframed page is served with GTM inside it).
  • if it is: then you can just inject GTM into the iframe (like you would inject any HTML into an iframe) if it's not already in the iframe.

Once GTM is running on the iframe, then it's a simple form tracking task that has nothing to do with the issue of iframes.

Max
  • 11,487
  • 26
  • 79
  • 129
  • Okay. The iframe is on the same domain. So if i have understood this correctly. All i have to do is insert the gtm script on the content in the iframe? – Whap Aug 15 '18 at 06:28