Difference between segments.geo_target_country and segments.activity_country

111 views
Skip to first unread message

Berna Toparlar

unread,
Nov 7, 2024, 11:04:47 AM11/7/24
to Google Ads API and AdWords API Forum
Hi, 

What is the difference between segments.geo_target_country and segments.activity_country? 

I need 2 types;
1. Country that my campaign was targetted
2. Counrty that actual activity of user happened - like where click, conversation, revenue, etc... is generated. 

Explanation is in API documantation is not clear for  segments.activity_country. Can you explain which field does what? 

Thanks, Berna

Google Ads API Forum Advisor

unread,
Nov 7, 2024, 3:09:58 PM11/7/24
to btop...@gmail.com, adwor...@googlegroups.com

Hi,

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

Regarding your question about segments.geo_target_country and segments.activity_country, here’s a breakdown of the two fields:

  • segments.geo_target_country: This represents the country where your campaign was targeted. It refers to the geographic location you selected when setting up the campaign, i.e., where you intended to show your ads.
  • segments.activity_country: This refers to the country where actual user activity occurred, such as where clicks, conversions, or revenue were generated. In other words, it represents the location of the user interacting with the ad.

Based on these documentations of segments.geo_target_country, segments.activity_country, you can use the appropriate field based on whether you're interested in the targeted country or the actual activity country.

I hope this helps.
 

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

Thanks,
 
Google Logo Google Ads API Team


Berna Toparlar

unread,
Nov 13, 2024, 5:52:33 AM11/13/24
to Google Ads API and AdWords API Forum
Hi, 

Thanks for the clarification, I need to use  segments.activity_country
however,  I can't include  segments.activity_country to my select stament when campaign is in my FROM clause. How can I retrieve this data? 

Here is my query:
SELECT campaign.id, campaign.name, campaign.status, segments.date, segments.activity_country, metrics.all_conversions_value, metrics.clicks, metrics.conversions, metrics.cost_micros, metrics.impressions, customer.id FROM campaign WHERE segments.date BETWEEN "2024-10-01" AND "2024-10-31"

Error:

Fix your query to address the errors below and re-submit.

  • 'segments.activity_country' is not a valid field in the SELECT clause when 'campaign' is the resource in the FROM clause. Fields in the SELECT must be 'Selectable'.

Google Ads API Forum Advisor

unread,
Nov 13, 2024, 9:50:08 AM11/13/24
to btop...@gmail.com, adwor...@googlegroups.com

Hi,

By reviewing your query, I understand that you want to retrieve the segements.activity_country from the campaign. Kindly note that it’s not possible to use the segments.activity_country when the campaign is specified in the FROM clause. Please note that when you specify campaign in the FROM clause, some metrics and segments cannot be used. I would recommend you to kindly refer to this campaign documentation that shows all metrics and segments that can be put in the same SELECT clause as the fields of campaign. I would suggest you use the filter in the provided documentation to show only the fields that can be used when a campaign is specified in the FROM clause.

I hope it clarifies, If you have any questions, please feel free to get back to us.

Berna Toparlar

unread,
Nov 13, 2024, 10:51:47 AM11/13/24
to Google Ads API and AdWords API Forum
Hi,

Do you know which FROM clause I should be using to get segments.activity_country?  I am trying to explore if generating multiple queries and then combinin them would help. 

Thanks, 

Google Ads API Forum Advisor

unread,
Nov 13, 2024, 4:03:08 PM11/13/24
to btop...@gmail.com, adwor...@googlegroups.com

Hi,

The resource travel_activity_performance_view is one of the resources where you can include the activity_city segment. So as we said earlier, I would suggest you use the filter in the provided documentation to show only the fields that can be used with specified resources in the FROM clause.

I hope it helps. 

Reply all
Reply to author
Forward
0 new messages