How can we pull "GCLID" for Adgroup.

1,279 views
Skip to first unread message

Suvigya Agrawal

unread,
Sep 22, 2023, 3:00:16 AM9/22/23
to Google Ads API and AdWords API Forum
I want to pull "GCLID" for Adgroup data. I am pulling "ad_group_ad.ad.final_urls" from ad_group_ad tables, but in this final URL's query parameter I don't see any "gclid" query parameter. How can I get it?

Thanks.

Google Ads API Forum Advisor

unread,
Sep 22, 2023, 8:42:52 AM9/22/23
to suvigyaa...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

The 'GCLID' (Google Click Identifier) parameter is typically not included in the final URLs directly because it's automatically modified by Google Ads when a user clicks on an ad. 

The 'GCLID' parameter is used to track the click and attribute it to a specific ad click event. If you want to access the 'GCLID' value associated with your ad clicks, you must enable your website and lead-tracking system to capture and store the GCLID, the unique ID that Google Ads provides for every impression of a Google ad. For more information, please refer to this link.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2p0PR7:ref"

Thanks,
 
Google Logo Google Ads API Team


Message has been deleted

Suvigya Agrawal

unread,
Sep 22, 2023, 10:04:20 AM9/22/23
to Google Ads API and AdWords API Forum
How I can pull "gclid"? Is "gclid" different at campaign and ad level? Is "gclid" related to keyword in any way? Can you provide query for each case (also the query builder link)?

Thanks.

Suvigya Agrawal

unread,
Sep 26, 2023, 2:36:29 AM9/26/23
to Google Ads API and AdWords API Forum
Please help with these questions.
  1. How can I pull "gclid"? 
  2. Is "gclid" different at campaign, ad and keyword level? Can we pull 'gclid' for campaign, ad and keyword level data? If yes please give query builder links.
I am using below queries to pull campaign, ad and keyword data and I also want to pull 'gclid' wherever possible. Please give the proper queries through which I can pull this.

Campaign:

SELECT campaign.name, campaign.id, campaign.start_date, campaign.end_date, campaign.status, campaign.advertising_channel_type, metrics.impressions, metrics.clicks, metrics.ctr, metrics.cost_micros, metrics.conversions, metrics.all_conversions, metrics.average_cpc, segments.date FROM campaign

Adgroup:

SELECT campaign.name, campaign.id, campaign.start_date, campaign.end_date, campaign.status, ad_group.name, ad_group.id, ad_group_ad.ad.id, ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.descriptions, ad_group_ad.ad.final_urls, metrics.impressions, metrics.clicks, metrics.ctr, metrics.cost_micros, metrics.conversions, metrics.all_conversions, metrics.average_cpc, segments.date FROM ad_group_ad

Keyword:

SELECT campaign.name, campaign.id, campaign.start_date, campaign.end_date, campaign.status, ad_group.name, ad_group.id, ad_group_criterion.keyword.text, ad_group_criterion.criterion_id, ad_group_criterion.keyword.match_type, metrics.impressions, metrics.clicks, metrics.ctr, metrics.cost_micros, metrics.conversions, metrics.all_conversions, metrics.average_cpc, segments.date FROM keyword_view

Thanks.

Google Ads API Forum Advisor

unread,
Sep 27, 2023, 9:32:08 AM9/27/23
to suvigyaa...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you're employing queries to retrieve campaign, ad, and keyword data and also looking for suitable queries to incorporate the 'gclid' parameter when available.

Please find the answers for your questions:

1. How can I pull "gclid"? 
  • Please find the sample query that demonstrates how to retrieve 'gclid' data from the "click_view" resource:
          SELECT campaign.id, click_view.gclid FROM click_view WHERE segments.date = '2023-09-01'

2. Is "gclid" different at campaign, ad and keyword level? Can we pull 'gclid' for campaign, ad and keyword level data? If yes please give query builder links.
  • No, the gclid is not different at the campaign, ad, and keyword level. It is a unique identifier for a conversion that is tracked using the Google Ads conversion tracking tag. 
  • Please note that the "gclid" data cannot be obtained from campaign, ad, or keyword-level data; instead, it can only be retrieved through the click_view resource.
  • Additionally, you can utilize the Google Ads Query Builder and Query Validator to build and validate the queries for retrieving the data in the Google Ads API. 
Kindly get back to us if you have any further questions related to the Google Ads API. 

Manuel Regidor

unread,
Oct 28, 2024, 3:19:44 PM10/28/24
to Google Ads API and AdWords API Forum
Hi.

I use conversiones offline import.

Is it possible for every gclid uploaded, the data for that gclid, like conversiones_value, country, currenct, etc?

Google Ads API Forum Advisor

unread,
Oct 29, 2024, 12:20:22 AM10/29/24
to mregi...@gmail.com, adwor...@googlegroups.com
Hi,

No, the Google Ads API does not have a resource that can help you fetch the conversion data (conversion_value, currency_code) uploaded with a particular GCLID. 

I hope this clarifies.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02p0PR7:ref" (ADR-00199617)


Thanks,
 
Google Logo Google Ads API Team


Manuel Regidor

unread,
Oct 29, 2024, 3:50:43 AM10/29/24
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Hi there,

Thank you for your response. I was wondering if you could suggest any alternative methods or workarounds to obtain the information associated with each GCLID? Any tips or unofficial approaches would be greatly appreciated.

Best regards,
Manuel

Google Ads API Forum Advisor

unread,
Oct 29, 2024, 8:08:41 AM10/29/24
to mregi...@gmail.com, adwor...@googlegroups.com
Hi,

As previously mentioned, there is no way to retrieve conversion data (such as conversion_value, currency_code, or country) associated with a specific GCLID. There is also no workaround to access this information. 
Reply all
Reply to author
Forward
0 new messages