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

We created 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 and ActiveCampaign without developers’ help. Previously adding a new contact or updating an existing one was only possible through the backend. It means that you had to ask your backend developers to set up the integration. Now you can set up the integration using the Google Tag Manager Server container. ActiveCampaign tag for the Google Tag Manager server container allows tracking events, creating or updating contacts, or doing both.

 

What is ActiveCampaign?

ActiveCampaign is an online CRM with feature-rich email marketing and sales functionality. The contacts and contact information for your customers are automatically transferred into your ActiveCampaign CRM. One of their most essential features is automation. You can automate things like lists and contact management, as well as deals. 

 

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. 

How ActiveCampaign intgation works?

Let’s say you have an e-commerce store that sells toothpaste. You want to add every new user who purchased to a contact list inside ActiveCampaign and send them a reminder to buy a new toothpaste.

To do that, you need to add this new contact to ActiveCampaign and add a parameter that will differentiate those who purchased. Previously it was possible only by backend developers because ActiveCampaign allows adding new contacts only using their API. 

We wanted to create an easier solution for integrating sites and ActiveCampaign. Now you can do that inside the Google Tag Manager server container using our ActiveCampaign tag. 

You won’t need developers’ help, website and ActiveCampaign integration is done inside the web and server Google Tag Manager container. If you already set up server-side Universal Analytics, GA4, or Facebook, you should have all required data 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:

  • Track event
  • Create or update contact
  • Create or update contact and track event

To do any of these actions, you’ll need to send this information inside the ActiveCampaign tag:

Email. User email, required field. 

API URL. To find 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 inside Settings section > Tracking > Event Tracking inside your ActiveCampaign account.

Actid. Required and can be found named “actid” inside Settings section > 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 website and ActiveCampaign using Google Tag Manager server container?

1. Set up a Google Tag Manager server container.

2. Add custom subdomain. This step is highly recommended but not required.

3. The first step would be to define what information you want to send to ActiveCampaign and when you want to send it. Then add this information to the Google Tag Manager Server container. 

4. I will show how to send data from the Web to the Server container using GA4. We have a detailed article on setting up server-side GA4. I will cover 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 user who purchased on your site to AC. I will use GA4 to send all required user and event information from the web to 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 required user and event parameters inside the Data Layer) -> Add trigger and click Save. 

GA4 server even purchase

7. Open 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 Server container.

GA4 tag inside the server container
GA4 trigger server Container

9. Open your site, go to the debug mode of web and server container, then test that the GA4 tag worked. You should see the event, event and user 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 that the variable works. Create variables for all 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 ActiveCampaign 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 with a user first and last name -> 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 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

Hope this guide helped you to integrate ActiveCampaign. Detailed integration of your site and ActiveCampaign is a must-have for a good email marketing campaign. It will help create personalized email campaigns, better segment your contact, 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 and AC without asking the developer since ActiveCampaign 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!