Data Connection: Google Analytics

In order for the Google Analytics integration to work, you must set up an identity enricher. An enricher allows Transcend to convert one user identifier (like email) into another (in this case, a Google Analytics ID).

Context (why you need an enricher at all)

A Google Analytics ID is what's called a custom identifier - that is, an identifier specific to some 3rd-party SaaS tool. Many tools have their own unique ID field to identify users, and some of those tools don’t play nicely with more standard identifiers like email. Segment is one such tool--it uses its own userId field to keep track of end users. Likewise, Google Analytics uses a custom identifier, which we call the googleAnalyticsId. Without knowing a given user's googleAnalyticsId, it's impossible for Transcend (or anyone else) to erase that user’s Google Analytics data via the API. For reference, here is the Google Analytics deletion route we use for Erasures.

If you're not sure how you set a user's googleAnalyticsId on your end, see here.

Currently, when a user submits a DSR to your organization, that DSR includes an email identifier but no googleAnalyticsId. Whenever possible, Transcend will enrich DSRs for you to retrieve as many identifiers as possible. As much as we'd love to retrieve your users' googleAnalyticsIds without your help, though, it's simply not possible. While some APIs do make this possible via routes that allow us to convert between identifiers, Google Analytics offers no such shortcut. So, how do we solve this problem? By using an enricher!

Further setup details

While Transcend doesn’t have the means to convert your user's email to a googleAnalyticsId, you likely do! Google Analytics’ tracking functionality requires any company using it (like you!) to define their own googleAnalyticsIds for the users they track. At some point, engineers at your organization determined this mapping of users to googleAnalyticsIds - that for user ABC, their googleAnalyticsId will be identifier XYZ, where XYZ could be a random string, the user’s internal organization user ID (if that exists), the user’s phone number, and so on (whatever the engineers decided). It is therefore quite likely that, somewhere within your data systems, there exists an internal record of your users' googleAnalyticsIds - for instance, a field within a user model in one of your databases. This is the mapping the enricher will capture.

With that in mind, setting up an enricher will require you to:

  1. Locate your internal mapping between users (preferably their emails) and googleAnalyticsIds (verifying that we can in fact perform enrichment),
  2. Spin up a server to receive webhooks from Transcend (docs here),
  3. Write a script that parses Transcend's webhook for the email identifier and triggers an asynchronous job to query for the corresponding googleAnalyticsId (code example here), and
  4. Write logic that posts the results of the query job (i.e. the retrieved googleAnalyticsId) back to Transcend's API, thereby completing the enrichment process.

To best navigate these steps, your most important resource is our detailed guide to identity enrichment.

This process may seem daunting, but it will require just one engineer from your end. In the past, setting up enrichment has taken companies anywhere from 2-10 hours (for the first enricher - all subsequent enrichers follow the same paradigm). If you need further guidance, Transcend Support ([email protected]) is happy to set aside some pairing time to help expedite your development process and unblock any difficulties you might face.

You might be thinking that this seems significant for just one integration, but this paradigm is common to all integrations that require custom enrichment as well as all server webhooks (i.e., integrating with your internal databases). Hence, it's the sort of work that, done once, is repeatable indefinitely. If you want to hook into any internal databases in the future, implementing this enricher will get you most of the way there!