user6078470
user6078470

Reputation:

AMP HTML & GTM/Analytics - Tracking iFrame Form Submission

the setup: AMP HTML Page with GTM Integration. The AMP HTML page loads my own form wizard via amp-iframe.

Now i want to track the submissions (from the iframe) via Google Analytics.

Is there any way?

EDIT: On the parent page, GTM is integrated with AMP via the new AMP Support/ AMP Container.

The Question is: How can i track the submissions in the amp-iframe. I can use GTM on the iframe content/child but then GA Tracks 2 Times: ones when AMP Page is loaded with the AMP GTM and then when iframe loads with the "normal" GTM?

Thanks, Daniel

Upvotes: 0

Views: 637

Answers (2)

user6078470
user6078470

Reputation:

i found a solution: Track the form submission via Measurement Protocol https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#events

and make sure that the cliend id are the same via https://www.simoahava.com/analytics/google-analytics-client-id-amp-pages/

Best, Daniel

Upvotes: 1

Lovntola
Lovntola

Reputation: 1409

Tag Mangager (with Analytics) ist now Supported in AMP without Iframe. But not with 100% Support.
I think for future Support you should use this solution.

Upvotes: 0

Related Questions