How to integrate ActiveCampaign with the website using Google Tag Manager Server container - Stape

How to integrate ActiveCampaign with the website using Google Tag Manager Server container

We created an ActiveCampaign tag for the Google Tag Manager server container to help connect websites with ActiveCampaign. The benefit of using this tag for the server container is that you can fully integrate your website with ActiveCampaign without the help from developers.  Now, you can set up the integration using the Google Tag Manager Server container. The ActiveCampaign tag for the Google Tag Manager server container allows tracking events, creating or updating contacts, or both.

What is ActiveCampaign?

ActiveCampaign is an online CRM with feature-rich email marketing and sales functionality. Since one of the essential features is automation, they allow an automatic transfer of all your contacts and contact information into your ActiveCampaign CRM.

ActiveCampaign is a powerful email marketing and CRM software that makes it easy to cultivate and nurture relationships. You can get started right away with its easy-to-use features, such as built-in reporting and geo-tracking. ActiveCampaign allows tracking user behavior on the site and sets up email automation based on their activities. 

Integrating your site with ActiveCampaign

Let’s say that you have an e-commerce store selling toothpaste. And you want to add every new customer to a contact list inside ActiveCampaign and send them a reminder about buying a new toothpaste.

To do that, you need to send this new contact to ActiveCampaign and add a parameter that will differentiate those who purchased. Previously, it was only possible with the help of developers because ActiveCampaign allows utilizing only the API method for adding contacts. 

We wanted to create a more straightforward solution for integrating sites with ActiveCampaign. So now, you can do that inside the Google Tag Manager server container using our ActiveCampaigns tag. 

And while you do not need any help from developers, you need to understand how to set up a web and server Google Tag Manager container. If you already set up server-side Universal Analytics, GA4, or Facebook, you should have all the data ready inside the web and server Google Tag Manager container.

Ok, let’s dive in.

How ActiveCampaign tag for Google Tag Manager server container works

AC tag for Google Tag Manager server container will communicate with ActiveCampaign API and send event and user data to your ActiveCampaign account. 

This tag allows to do the following:

    • Track events
    • Create or update contacts
    • Create or update contacts and track events

 

To do any of these events, you need to send this information to the ActiveCampaign:

Email. User email. Required field. 

API URL. To find the API URL for your AC, go to my settings page under the “Developer” tab.

API KEY. Each user inside your AC has their API KEY. You can find it on the settings page under the “Developer” tab.

First name. User information. Not required 

Last name. User information. Not required 

Phone. User information. Not required 

Event Key. Required and can be found named “Event Key” on Settings > Tracking > Event Tracking inside your ActiveCampaign account.

Actid. Required and can be found named “actid” on Settings > Tracking > Click Event Tracking API.

Event name. Event name that should be added inside the AC. 

Event Data. Parameters you want to add to the event. 

Contact custom field values. You can add custom fields to the contact.

How to integrate your website with ActiveCampaign

    1. Set up a Google Tag Manager server container.
    2. Add custom subdomain. This step is highly recommended but not required.
    3. To set the Active Campaigns tag inside the server container, you need to have the event and user parameters you want to send to ActiveCampaign. The first step would be to define what information you need to send from the web to the server container. 
    4. I will show you how to send data from the web to the server container using GA4.Here is a detailed description of how to set up server-side GA4. I will cover the basic steps in this how-to as well. The first step will be setting up server-side GA4.
    5. Let’s say you want to add a customer who made a purchase on your site to AC. I will use GA4 to send all the required user and event information from the web to the server container. Inside the web container, create GA4 base code -> Create a new tag with a tag type Google Analytics: GA4 Configuration -> Add GA4 Measurement ID -> Add transport_url inside the Fields to Set. 
GA4 base server-side

6. Create GA4 purchase tag -> Create a new tag with a tag type Google Analytics: GA4 Event -> Select Configuration Tag (base GA4 tag that you’ve created on the previous step) -> Add event name -> Add Event Parameters and User Properties. I have all the required user and event parameters inside the data layer -> Add a trigger and click Save. 

GA4 server even purchase

7. Open the server container and create GA4 Client. 

GA4 client server container

8. Inside the server container, click on the Tag tab -> Create GA4 Tag -> Add GA4 ID -> Inside the event name, select variable Event Name -> It should trigger whenever a GA4 client is claimed. Publish the server container.

GA4 tag inside the server container
GA4 trigger server Container

9. Open your site and test the GA4 tag. You should see the event itself, user and event parameters inside the server container debug mode. 

test GA4 tag in the server Container

10. Now, I will create variables inside the server container that will collect user information. Inside the server container, create a new variable -> Variable type Event Data -> Add your key path. In my case, it’s x-ga-mp2-user_properties.email. Open the preview mode and check if the variable works. Create variables for other user parameters.

user data GA4 server side
test user data GA4 server side

11. Add ActiveCampaign tag to the Server container using this link.

12. Create an Active Campaign tag inside the Server container. Select event type, I want to add or update a contact and track event -> Add a variable that captures user email -> Add API URL, API Key (you can find it inside the AC account on the Settings page under the “Developer” tab) -> Add variables using a first and last name of the user -> Add Event Key and Actid (you can find it inside the AC account, Settings > Tracking > Event Tracking API) -> Add event name and event data. You can add more parameters inside the Contact custom field values. This tag should trigger purchase events from the GA4 client.

active campaign tag server container
active campaign trigger server container

13. Open the preview mode of the web and server container and test the tag you’ve recently set up. If everything works correctly, you will see the email address and event you’ve used for the test inside the AC.

test active campaign tag google tag manager
test active campaign tag google tag manager server

14. Publish web and server containers. 

Conclusion

I hope this guide helped you integrate ActiveCampaign with your website. Detailed description of the integration is a must-have for a successful email marketing campaign. It will help create personalized email campaigns, segment your contacts better, and create more detailed reports. 

Using ActiveCampaign tag for the Google Tag Manager server container is one of the easiest ways to integrate your site with AC without the help of developers, especially sinceActiveCampaign accepts data only from the server.



If you want to test what the GTM server is and how it works, please register an account.

If you need help setting up a GTM server account on your website, contact us right away!