Search code examples
google-analyticsgoogle-apigoogle-analytics-apigoogle-ads-apigoogle-reporting-api

What kind of data I can retrieve from google with gclid and client id?


I add analytics.js script on my website. Also, some visitors of my website come from adWords.

So, I have website visitor identificators:

  • ClientId from _ga cookie
  • GCLID time-to-time from query parameter

Does it possible retrieve "search keyword" and/or other data with Google APIs using this identificators?


Solution

  • No, or at least not by default in a standard account.

    The client id is not exposed via the API or in the GUI, with the sole exception of the User Explorer Report (which is not exposed via the API). You could store the client id as custom dimension and use it to search for data. it would not give you organic keywords (for some time now organic keywords are mostly unavailable in GA), but conceivably paid keywords for a session.

    The GCLID is resolved within GA to medium (cpc), source (Google) and campaign name (whatever you named your campaign within Adwords), but it is not directly accessible in GA, and it does not give your user level data.

    If you are in a GA360 account you can export data to BigQuery, which gives you a more comprehensive dataset including the client id (but still no organic keywords).