Integrating the Freshmarketer JS Code on a site using Google Tag Manager involves few easy steps. This article guides you through the integration process.

NOTE: Google Tag Manager doesn’t support synchronous code. Hence, the integration is done using Asynchronous code.

STEP 1: Navigate to Integrations page

Login to Freshmarketer account. From the Freshmarketer dashboard, navigate to Project Settings -> Integrations.

STEP 2: Enabling Google Tag Manager integration

In the Integrations tab, from the list of available options, enable Google Tag Manager integration.

STEP 3: Confirm before proceeding to next step

A pop-up appears asking users to confirm integrating with GTM as GTM might cause page flickering during AB testing. Click Yes to proceed. Read this article to know more about the asynchronous script and page flickering effect.



STEP 4: Select a Google account

In the page that appears, choose a Google account for which the goals have to be imported.

NOTE: To change the account, disable the Google Tag Manager integration. It logs out of the existing account. Enable it again to select the account.

STEP 5: Grant permissions in Google Permissions page

Click Allow button to accept and grant the required permissions in the Google Permissions page.

STEP 6: Select a GTM account to insert Freshmarketer tag

A pop-up appears with the list of GTM accounts linked to the selected Google account. Select a particular GTM account and click Next to proceed.

STEP 7: Select a container

Now, select a container from the list of containers associated with the selected GTM account and click Save & Close.

STEP 8: Freshmarketer tag appears in the GTM account

Now, in the GTM, click the respective container. In the page that opens, under Workspace tab, click Tags in the left pane. Freshmarketer tag will be present in the right pane. The Freshmarketer tag will be named with a prefix Freshmarketer-AsyncJS_Code followed by the OrgId.

Click on the Freshmarketer tag below the Name column to see Freshmarketert’s Asynchronous code added. The triggering is set as All Pages by default.

NOTE: If the GTM container code is not installed in the site, navigate to Admin -> Install Google Tag Manager. Copy the code and paste it onto the native code of the necessary pages in the site.

Technical Support
Don't see what you're looking for? Just drop us a mail