Skip to main content

Setting Up GTM

A guide for setting up Appfront-related tags using Google Analytics 4 (GA4).

S
Written by Support Agent

For any additional tags or specific requirements, please consult with us at support@appfront.ai.

GTM Set-Up for Appfront

1. Creating a GA4 Configuration Tag:

  1. Go to the Tags page in GTM and click New to create a tag.

  2. Click inside the Triggering section and select All Pages - Page View.

  3. Click inside the Tag Configuration section and choose Google Analytics: GA4 Configuration.

  4. Paste your Measurement ID (see below for instructions to find it) and click Save.


Finding Your Measurement ID:

  1. Open the Google Analytics dashboard and navigate to Admin → Data Streams.

  2. Select your website and copy the Measurement ID.


2. Creating E-Commerce Event Tags:

  1. Go to the Tags page and click New.

  2. Click inside the Triggering section and create a new trigger for each event.

  3. Select Custom Event under Trigger Configuration and set the event name:

    • add_to_cart, view_item, or purchase (create separate triggers for each).

  4. Click inside the Tag Configuration section and choose Google Analytics: GA4 Event.

  5. Configure the tag:

    • Configuration Tag: The GA4 configuration tag you created earlier.

    • Event Name: Match the trigger event name (e.g., add_to_cart).

  6. Add event parameters (e.g., items, transaction_id, value) under Event Parameters:

    • Use Data Layer Variables to set the parameter values.

  7. Save your tag configuration.

Supported Parameters:

  • add_to_cart, view_item: items

  • purchase: items, transaction_id, affiliation, value, coupon, currency, shipping, tax


Integrate GTM with Appfront

  1. Copy your GTM container ID from the GTM dashboard.

  2. Log in to your Appfront portal and navigate to Configure → Applications → Tracking.

  3. Scroll to the GTM and Google Ads section, and paste the container ID into the Tracking ID field.

  4. Save your changes.


Testing and Publishing

  1. Before testing, ensure you’ve:

    • Created all necessary Tags, Triggers, and Data Layer Variables.

    • Integrated GTM with Appfront.

  2. Click Preview in GTM and perform a test purchase.

  3. Verify data under the Variables tab for the triggered event.

  4. Once validated, click Publish.

Did this answer your question?