Skip to main content

Guide to Setting up AMFG with Google Tag Manager

Written by Yordan Mitrev
Updated over 8 months ago

Intro & Background

This article describes how to set up your AMFG Front End Ordering Portal with Google Tag Manager, to track events occurring in your Portal.

Google Analytics 4 is Google's next-generation measurement solution, and it has replaced Universal Analytics. Starting July 1, 2023, standard Universal Analytics properties stopped processing new data. To maintain your website measurement, you'll need a Google Analytics 4 property.

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app. Once the small segment of Tag Manager code has been added to your project, you can safely and easily deploy analytics and measurement tag configurations from a web-based user interface.

When Tag Manager is installed, your website or app can communicate with the Tag Manager servers. You can then use Tag Manager's web-based user interface to set up tags, establish triggers that cause your tag to fire when certain events occur, and create variables that can be used to simplify and automate your tag configurations.

A collection of tags, triggers, variables, and related configurations installed on a given website or mobile app is called a container. A Tag Manager container can replace all other manually-coded tags on a site or app, including tags from Google Ads, Google Analytics, Floodlight, and 3rd party tags.

The following instructions are for setting up Web containers to track tags on websites. If you are not experienced with code or do not have access to your website or mobile app code, you may need to ask a developer for help at this step.

Instructions to set up Google Tag Manager with AMFG

  • In Google Tag Manager, click Workspace.

  • Near the top of the window, find your container ID, formatted as "GTM-XXXXXX".

  • Navigate to the AMFG Management Console -> Settings -> Application section, and set Analytics to “Other Analytics

  • Provide the AMFG Support team with the Container ID in "GTM-XXXXXX" format to complete the process.

  • While AMFG Support is completing the process on the backend, please proceed with creating your first tags in Tag Manager accordingly.

Create your first Google Tag to track data

To fetch data from Tag Manager into your Google Analytics portal, please follow the steps below to create your first tag:

  1. Navigate to Tag Manager -> Workspace -> Tags -> New:

  2. Select Tag Configuration -> Google Analytics -> Google Analytics: GA4 Event:


    3. Add Measurement ID from your Google Analytics account found in the Admin page, under Data collection and modification -> click Data Streams, select the Web tab, and click the web data stream.


4. Then set Event Parameters for the tag as below:


  • Event parameter: cookie_flags
    Value: max-age=7200;secure;samesite=none

  • Event parameter: send_page_view
    Value: true

Note: These Event Parameters have to be applied to any new tag you're creating subsequently as well!

5. Then go to Triggering and add all available triggers or create custom triggers, following which you can 'Save' the tag:

6. Once the tag is saved, click the 'Submit' -> 'Publish' buttons at the top-right corner to apply the new changes:


Testing if the Tag Manager is tracking data on your website

After receiving confirmation from the AMFG team that the Container ID has been added to your AMFG application, verify that Tag Manager is successfully tracking actions and events from your AMFG application.

  • In Tag Manager, ensure that the Container ID is live. The following illustrations refer to a test container with ID GTM-T9BWKHJC:

  • Tag Assistant (https://tagassistant.google.com) will indicate when your AMFG Front End Ordering Portal is connected and display information about the collected data. To initiate debugging mode with Tag Assistant, please click on 'Preview' -> then follow the steps required to Connect to the site:


  • This will trigger a pop-up window or a new tab on your browser with the connected site, where the Tag Assistant window will be active. Please do NOT close the Tag Assistant while debugging!

  • In debugging mode, you will start seeing the list of events that will be updated at the Summary menu on the left sidebar whenever a new event occurs at the connected ordering portal. Each event would also contain details about the exact data collected by your tags:




Did this answer your question?