We have the following scenario:
Website A has GTAG installed and tracks every page visit, sending a
internalUserId along in the
dataLayer (when the user is logged).
Website B is a CRM where we list all users, and it uses the same database as
In the CRM we need to see what pages each of our users have visited.
Ideal solution: call Analytics API passing
internalUserIdand returning a list of pages the user visited.
Alternative 1: make
Website Acall an internal API that registers a visit, along with any other metadata. Unfortunately the dev team behind
Website Awants to avoid this approach as it will send yet another request on every page, thus slowing the page down. So the suggestion was to leverage analytics to gather this information.
Alternative 2: somehow instruct Tag manager to call an external API every time a visit occurs, and send along any meta data. I don't actually know if Tag manager offers this service or not.
The alternative 1 & 2 will mean that we will store the visit stats, while the ideal solution will use Analytics stats.
So the question is:
Does Analytics API offer the ability to query for a specific user identified by a custom property,
internalUserId, that we set using
dataLayer, and return that user's stats (visits) ?
Thank you very much