0405123696 petra@web-data-analytics.com

I’ve been working on an interesting project in the last week or so, where we’ve been tasked with pulling tags off an Ecommerce product page (the platform is Magento and the tags are being added as Meta Keyword tags) and then sending them through to ActiveCampaign.

The way that I have designed the strategy is that if a user interacts with a product containing a keyword tag for at least 30 seconds then that tag will be automatically pushed to ActiveCampaign for the logged in user. In this case, every user has to log in in order to see the product page so we have an easily accessible ActiveCampaign account for the user based on the user’s email address.

We ran into a hitch early on though, we were trying to push these tags directly from Google Tag Manager and then ran into a technical problem.

CORS issue

Unfortunately ActiveCampaign servers don’t appear to support the Access-Control-Allow-Origin header that is sent with a javascript implementation in Google Tag Manager. Activecampaign is currently only accepting “pageview event” requests from Google Tag Manager. In English, that means all the information needs to be included on the URL when a page is viewed. The problem when you try to do this in Google Tag Manager though is you get the error above.

So basically trying to talk to ActiveCampaign directly from Google Tag Manager is like trying to have a phone conversation with an inmate in a high security prison!

I didn’t believe it at first, but it turns out the issue was mentioned here in the comments on ActiveCampaign’s own website: https://www.activecampaign.com/blog/how-to-setup-activecampaign-event-tracking

Back to the drawing board!

Luckily we discovered another tool called Segmenthttps://segment.com/docs/destinations/activecampaign/

Segment is basically like the Zapier of personalisation data. It is free for the first 1000 users and talks to ActiveCampaign in a language that ActiveCampaign accepts. Yay!

So to do this, we ended up writing some javascript to send a “virtual pageview” to segment each time the tagging condition fires. Basically it happens once on a single page, after 30 seconds of engagement (mouse moving or scrolling of the page) and it sends a virtual pageview (a fake page view) to the Segment app.

Segment then passes that page view along to AQctiveCampaign. We have an automation in ActiveCampaign that listens out for that page name and then applies the tag.

These tags are used by ActiveCampaign to work out which emails to send so I didn’t want users to get unlimited numbers of tags. They really should only be tagged with categories they are truly interested in, or it defeats the purpose of tagging them in the first place.


Just in case a user got tagged with too many things, we set up a provision in ActiveCampaign that each time a virtual page view comes in for a specific tag, we start a new timer. The timer automatically removes that tag from that user’s account if they don’t trigger it again within 60 days. It works in this case because the Ecommerce business is a wholesaler and users are expected to return to the website weekly and purchase regularly. If users were only occasionally purchasing this would be far too soon; maybe you’d remove the tag after a year or so in that case.

There are only 30 or so tags tops, so it doesn’t turn into a spamfest with hundreds of different combinations.

We’re still in the testing phase, but so far it looks like the overall idea is working. This client is well on her way to much smarter and more personalised emailing to her customer base, without all the headaches and complexity.

Share this article!

SleepWise Clinic

Petra was instrumental in pulling all our clinic's web analytics into one easy to read, dynamic report that's accessible to me at any time, and works with our EXACT booking system.

This has allowed me to see, at a glance, what marketing initiatives are working, need tweaking, or changing altogether, saving me both time and money. I can't recommend her or her analytic services enough.

Ian Gale SleepWise Clinic Strategy Session August 1, 2018

shares