ActiveCampaign Forum

Identify User from Newsletter Click



We have to following use case:

  1. User fills out the newsletter register form on a page
  2. User is now identified on the page by cookie and we can retrieve the contact object through the API
  3. Some days later, the same User becomes a newsletter and open the site link from another computer as step 1 was done. Active Campaign sets an new cookie on the page, based on the tracking link in the mail.

Isn’t it possible to retrieve the contact data through the API (methods contact_view, contact_view_mail or contact_view_hash) based on this cookie from the tracking link?

Otherwise we have to pass a contact parameter (for example the mail address) on every link in the newsletter to later identify the user based on this parameter.

I hope its understandable what I want to achieve.
Thanks a lot!


Hi @snapsnap,

I am a bit confused what you are hoping to achieve. Did you want to personalize the site based on user attributes?

I see a few issues with your strategy, mostly around step 2 in your plan.

Isn’t it possible to retrieve the contact data through the API (methods contact_view, contact_view_mail or contact_view_hash) based on this cookie from the tracking link?

A: Not really. If you have the contact’s email, contact’s id, or both, you can make a request to the API to pull the complete contact record. However

It is not trivial to be able to pull a user from the API using only the AC site tracking cookie. I am not even sure it is possible.

If you only want to make sure the contact is identified via ActiveCampaign Site Tracking, which is a common use case, then all you need to do is install Site Tracking snippet on our site. If you are using our forms, the contact will be identified automatically.

If you are using custom or 3rd party forms, you will need to identify the user manually, but setting the trackcmp_email variable to the user’s email address before calling site tracking (or setting the variable and calling site tracking again).

But we will also re-identify the user every time they click on a link from an email. In your example on step 3, you dont need to do anything the contact will be updated on their own.

Does that help to answer your question?


Hi @jskole

Our goal is to show the firstname of the contact on the website.
As you described, when the user fill out the AC form, the user will be identified and AC stores a cookie. At the same time, we store the e-mail address in the cookie on our self to later retrieve the first name over the AC API by email. This works fine.

But when the user opens the website in another browser (for example after he clicks on the site link to our site in a AC Newsletter), there isn’t a cookie which we can identify the user by mail, id or something else.
In this case, it would be useful if AC sets a cookie on the site after the user clicked on the site link in the mail. With this cookie, we can identify the user again and we can personalize the user through the complete user journey.



Ahhh I see, okay so there are a few ways!

  • Use a query param like how you described. I would probably do it this way personally, and then have a script run on page load that checks if that query param exists and stores a value in localStorage.
  • Deconstruct the cookie. When a user clicks on a link from an email, we do identify them and store the value in a cookie. So for example, if a user submits a form from device “a” then they will be identified. If we later send an email and the user checks on device “b” and clicks an email in the link, the user will be identified and all following Site Tracking activity on device “b” will be logged to the contact profile.

Like I said, I personally haven’t deconstructed the cookie like that to try and fetch the entire contact record, I would be more likely to just do the first option.



Thanks for your response!

We already tried to deconstruct the cookie, but it’s not possible because the the hash which is set by click on the mail link is not the same as we can retrieve the user by the contact_view_hash API method.

So I think the only way is to use a query parameter. It would be great if there would be an option to append this parameter automatically to every link, so we don’t have to add it on every page link in the newsletter.


Agreed! I talked to the product team about this and submitted an internal idea. I would encourage you to submit your feedback too!


Hi @snapsnap. What is the name of the cookie that you tried to deconstruct? (I want to try this myself also.)



Any news on this feature? Because we also would like to identify users if they are known by site tracking. A javascript query to with a contact hash result will be fine. Hope we can work this out…


@coen Do you know more about this now? Would someone from AC give a status here, please?


This is not possible, only by setting e-mail of user in a cookie, which isn’t very gdpr compliant. The fact that we cannot lookup the site tracking hash to a user is just stupid and should have been implemented already.

We have now started to look for a new solution based on Mautic. We intend to move from ActiveCampaign to Mautic if they don’t fix this.

We are disappointed in ActiveCampaign, because they don’t respond on forums and their ideas portal. They have also developt a new API (v3) that is more limited than the previous one.

Customer data platforms are booming, people want to dynamicly load content based on a profile. ActiveCampaign doesn’t allow this, only by putting the e-mail address in the public domain, which is a violation.