# Google Analytics source tracking – email ID lookup

**URL:** <https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [September 12, 2018, 2:20pm UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852 "2018-09-12T14:20:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 12, 2018, 2:20pm UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852/1 "2018-09-12T14:20:53Z")

</div>

Hello,

As per the [article here](https://knowledge.hubspot.com/email-user-guide-v2/how-to-set-up-your-email-tracking), when sending email campaigns, Hubspot adds certain UTM parameters to links.

One of there is `utm_content`, which from the article above is set to “email ID number”. I presume that this is some unique identifier for the Contact that clicked the link in the email.

Is there a way to do a reverse-lookup via the API using this “email ID number”, and get back a Contact, or at the very least, an email address?

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 17, 2018, 10:06pm UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852/2 "2018-09-17T22:06:16Z")

</div>

Hi [@elsurudo](https://community.hubspot.com/u/elsurudo),

The “email ID number” refers to the email itself. If you navigate to the email tool and open an email, you will see a string of numbers in the URL.

For example, in the URL: [https://app.hubspot.com/email/{your\_hub\_id}/details/1234567890/performance](https://app.hubspot.com/email/%7Byour_hub_id%7D/details/1234567890/performance), `1234567890` is the email ID, which would populate the `utm_content` parameter.

It’s possible to reverse-lookup the _email_ which resulted in visits by copying the email ID into the email tool’s URL, but only the [tracking code](https://knowledge.hubspot.com/articles/kcs_article/reports-settings/install-the-hubspot-tracking-code) can trace the visit back to a specific contact. This information is then viewable on the contact record and in several HubSpot reports.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 18, 2018, 12:40am UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852/3 "2018-09-18T00:40:37Z")

</div>

Hello Isaac,

What you are saying makes sense, but are you sure that the `utm_content` param links to the email record? I tried to open a link similar to the one you posted (with my own Hub ID, of course), and the `utm_content` from the link in the email I received, but the page wasn’t found…

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [September 18, 2018, 12:48am UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852/4 "2018-09-18T00:48:22Z")

</div>

Additionally, assuming a user has the tracking code installed, is it possible to get email link click data via API? If so, from which endpoint? I suspect it is the [contacts endpoint](https://developers.hubspot.com/docs/methods/contacts/get_contact), but clarification would be appreciated – especially around how the data would appear in the response.

Is it possible to view detailed event information for such link clicks, or just aggregate data?

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [September 21, 2018, 1:45pm UTC](https://community.hubspot.com/t/google-analytics-source-tracking-email-id-lookup/11852/5 "2018-09-21T13:45:19Z")

</div>

Apologies for the delayed response,[@elsurudo](https://community.hubspot.com/u/elsurudo),

Yep, I’m sure. The _Source tracking_ section of [this article](https://knowledge.hubspot.com/email-user-guide-v2/how-to-set-up-your-email-tracking) describes how the `utm_content` parameter is filled with an email’s ID when HubSpot marketing email tracking is enabled.

Perhaps the email you were looking for was deleted. Can you send me the full link you tried?

Yes, it’s also possible to get email click data via the [Email Events API](https://developers.hubspot.com/docs/methods/email/email_events_overview). You can pull engagement data (including clicks) by recipient with [this endpoint](https://developers.hubspot.com/docs/methods/email/get_events) and the `recipient` parameter. The documentation includes some example responses.
