{"id":4719,"date":"2024-12-24T12:59:02","date_gmt":"2024-12-24T12:59:02","guid":{"rendered":"https:\/\/helpcenter.greyd.io\/greyd-forms-tracking-de\/"},"modified":"2024-12-26T18:29:16","modified_gmt":"2024-12-26T17:29:16","slug":"greyd-forms-tracking-de","status":"publish","type":"post","link":"https:\/\/helpcenter.greyd.io\/de\/greyd-forms-tracking-de\/","title":{"rendered":"How to set up Google Tag Manager event Tracking for Greyd.Forms"},"content":{"rendered":"
This article explains, how you can track form events from your Greyd.Forms forms in Google Analytics using the Google Tag Manager.<\/p>\n
<\/p>\n
The variables ensure that a Greyd form is recognized on a page and that the form CSS ID, form post ID and form name are read out. The form CSS ID is used to recognize the correct form in the DOM, the other two to pass on the form recognition data to Google Analytics.<\/p>\n
<\/p>\n
Go to "Variables" and create 3 new variables:<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
<\/p>\n
Go to "Triggers" and configure at least the first one:<\/p>\n
GA4 Form Trigger<\/strong><\/p>\n The first trigger ensures that the GA4 Form Submission tag is called when the event with the name \u201cgreydFormSubmission\u201d is recognized.<\/p>\n<\/li>\n<\/ul>\n <\/p>\n Exclude<\/b> WordPress Backend <\/strong><\/p>\n The second trigger is optional. It ensures that a page view is always prevented from being tracked in the WordPress backend. Depending on how the Tag Manager script was integrated, this can be important. <\/p>\n<\/li>\n<\/ul>\n <\/p>\n <\/p>\n Step 3: Configure Tags<\/strong><\/p>\n Go to "Tags" and configure the following tags:<\/p>\n This tag plays a script that checks whether a form is submitted. After the form has been submitted, the \u201cgreydFormSubmission\u201d event is triggered and the \u201cGA4 Form Trigger\u201d is activated. This also writes the data layer variables on the form page.<\/p>\n <\/p>\n <\/p>\n This tag contains the measurement ID of the Google Analytics account and defines the data that is transferred to the Google Analytics account. It is triggered by the \u201cGA4 Form Trigger\u201d trigger.<\/p>\n <\/p>\n <\/p>\n Step 4: Check data in Google Analytics<\/strong><\/p>\n Once you have set this up, you can now call up a form for testing, fill and submit it. It may take a few seconds for the data to appear in the real-time report. If a caching plugin is installed on the page, we recommend to delete the cache first.<\/p>\n <\/p>\n After 24 hours you will also find the data in the Engagement report:<\/p>\n <\/p>\n Please note: For the form tracking in Google Tag Manager to work, there cannot be more than one form on a page.<\/p>\n <\/p>\n\n
\n
<script> jQuery(document).ready( function() { jQuery(document).on('submit', function(event) { dataLayer.push ({ 'event' : 'greydFormSubmission', 'GreydformID' : {{Greyd Form ID}}, 'GreydformName' : {{Greyd Form Name}} }); }); }); <\/script><\/code> <\/p>\n
\n
\n