On First Connect to Google Ads REST API - Cold Starts?

2024-06-03 Thread Jebron Lames
Hi,

My question pertains to the first instance of a Google Ads Client and 
making the first request from the Ads Api.

issue:
 I notice that the first one seems to take some time on the very first 
instance.

After the user authenticates for the first time => the first request will 
take 10-15 seconds. After that things speed up greatly and it seems fine 
(1-2 secs). Have not had this issue with making POST requests either.

When a user logs into the app, the first request made is to get Shopping 
performance segmented by date ('last_30_days').  I did this to satisfy the 
Google RMF for standard shopping  tool. However, this is my slowest call it 
seems. I question if it's a result of the query itself or if the first 
instance with Google has something to do with that. 

Again after the first call, app all subsequent requests resolve quite fast.

API: V16 REST


here is the query below:

export const getAppAnalyticsQuery = (segment: string) => {
  
  return `
  SELECT
  campaign.name,
  campaign.advertising_channel_type,
  campaign.resource_name,
  campaign.status,
  segments.product_title,
  metrics.conversions,
  metrics.conversions_value,
  metrics.clicks,
  metrics.cost_micros,
  metrics.cost_per_conversion,
  metrics.ctr,
  metrics.impressions,
  metrics.average_cpc,
  campaign.id,
  segments.date
  FROM shopping_performance_view
  WHERE
  campaign.status = 'ENABLED'
  AND campaign.advertising_channel_type = 'SHOPPING'
  AND segments.date DURING ${segment}
  ORDER BY
  segments.date ASC
`;
};

Is this normal? I understand maybe sometimes the Access token needs to be 
refreshed, but I am not sure that if that has anything to do with it.

regards,
Michael

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9caa76f8-908e-438b-87a6-0476dd3a2cf0n%40googlegroups.com.


Retrieve negative keywords at campaign and ad group level

2024-03-25 Thread Jebron Lames
Hello,

I am working on getting the negative keywords of a Shopping Campaign from 
the Google Ads Api and was wondering if there was a way to combine both the 
ad_group level and campaign level negative keywords in one query?

At the moment, I am querying from ad_Group_criterion and campaign_criterion 
separately and It just feels plain cavalier to have to do 2 separate 
queries for seemingly related information.

Is there a way to query and retrieve both my campaign level and ad group 
level negative keywords in one query?

On the Google ads UI, you can determine what level the keyword is at (ad 
group or campaign).

At the moment, I'm under the impression I need to do two separate queries  
to combine this information. 

Hoping there is a better way.
[image: negativeKeywords.png]

Regards,
Michael H.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/18762fec-c2ea-4d83-a942-04121d497d00n%40googlegroups.com.


Re: adgroupcriterionoperation - update listinggrouptype unit to subdivision

2024-02-22 Thread Jebron Lames
I figured it out and can now convert a UNIT to SUBDIVISION with additional 
UNIT nodes. Firstly, thank you for getting back each time. 

For those whom I hope this helps...

*first error:*  I was pointing the "others" node parent resource to that of 
the root node criterion_id and not the new subdivision.

*second error: * I was subdividing the partition by product_item_id, I 
incorrectly configured my code to mimic the case_value property of the 
selected node and not what it was going to be subdivided by.

The example is the order of how I am doing it (order of operations).  I 
want to note though that *I only create a subdivision if a user decides to 
subdivide a node (i.e. brand or product type) that is currently a UNIT*.  
case_value for all nodes are dynamically determined based on the 
selectedNode and to be added UNIT nodes. If it's already a subdivision, 
then this process is skipped.

const updateSelectedNodeType = new resources.AdGroupCriterion({
resource_name: tempSubdivisionResource,
ad_group: adGroupResource,
listing_group: {
  parent_ad_group_criterion: parentNode,
  type: enums.ListingGroupType.SUBDIVISION,
  case_value: caseValue,
},
negative: false,
status: enums.AdGroupCriterionStatus.ENABLED,
  });

  const everythingElseNode = new resources.AdGroupCriterion({
resource_name: everythingElseResource,
ad_group: adGroupResource,
cpc_bid_micros: toMicros(0.4),
listing_group: {
  parent_ad_group_criterion: tempSubdivisionResource,
  type: enums.ListingGroupType.UNIT,
  case_value: everythingElseCaseValue,
},
negative: false,
status: enums.AdGroupCriterionStatus.ENABLED,
  });

  const updatePartitionToSubdivision: MutateOperation =
{
  entity: "ad_group_criterion",
  operation: "create",
  resource: {
...updateSelectedNodeType,
  },
};

  createSubdivisionOperation.push(updatePartitionToSubdivision);

  const createEverythingElseNodeOperation: MutateOperation =
{
  entity: "ad_group_criterion",
  operation: "create",
  resource: {
...everythingElseNode,
  },
};
  createSubdivisionOperation.push(createEverythingElseNodeOperation);
//partition object with set cpc, but can be changed for user.
const newPartition = new resources.AdGroupCriterion({
  ad_group: `customers/${customer}/adGroups/${adGroupId}`,
  resource_name: criterionResourceOperation,
  cpc_bid_micros: toMicros(0.4),
  negative: false,
  status: enums.AdGroupCriterionStatus.ENABLED,
  listing_group: {
parent_ad_group_criterion: parentAdGroupCriterion,
type: enums.ListingGroupType.UNIT,
case_value: caseValue,
  },
});
//finalize for operation
const addPartitionNodes: MutateOperation 
=
  {
entity: "ad_group_criterion",
operation: "create",
resource: newPartition,
  };

//push for batch operation
addPartitionOperation.push(addPartitionNodes);


mutation: [
  {
entity: 'ad_group_criterion',
operation: 'create',
resource: {
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-1',
  ad_group: 'customers/2595901092/adGroups/157149367644',
  listing_group: [Object],
  negative: false,
  status: 2
}
  },
  {
entity: 'ad_group_criterion',
operation: 'create',
resource: {
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-2',
  ad_group: 'customers/2595901092/adGroups/157149367644',
  cpc_bid_micros: 40,
  listing_group: [Object],
  negative: false,
  status: 2
}
  },
  {
operation: 'create',
resource: v {
  ad_group: 'customers/2595901092/adGroups/157149367644',
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-3',
  cpc_bid_micros: 40,
  negative: false,
  status: 2,
  listing_group: [Object]
}
  }
] [
//case values:
  { product_brand: { value: 'bromic' } },
  { product_item_id: {} },
  {
product_item_id: { value: 'shopify_us_5695534235803_36317916823707' }
  }
]
Operation Success! Subdivision created.

Purely comes down to a misunderstanding on my part. Thanks for working with 
me on this.

Regards,
Michael H.



On Thursday, February 22, 2024 at 2:01:29 PM UTC+7 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for getting back to us.
>
> I understand that you are seeking assistance for 
> LISTING_GROUP_ALREADY_EXISTS 
> 
>  error 
> and LISTING_GROUP_SUBDIVISION_REQUIRES_OTHERS_CASE 
> 

Re: adgroupcriterionoperation - update listinggrouptype unit to subdivision

2024-02-21 Thread Jebron Lames
Thanks for getting back to me again. I just want to say I appreciate your 
responses and deeply apologize as this is quite a complex and sensitive 
process given the constraints.

in your response:

   - You don't necessarily need to find and delete an "Others" node that 
   doesn't exist in your current tree. While the "Others" node captures 
   everything not explicitly covered by your subdivisions, it's automatically 
   created if it doesn't exist when you add a new subdivision.

Here are 3 separate examples (server-side logs) of trying to work with the 
API to convert a unit to a subdivision.
In each test I am:  In the 1st case, I pass just 2 objects (resource -1 & 
resource -2) as I was curious to see if I didn't add an "others" case, if 
it would be added. Each subsequent test I pass 3 objects to handle the 
"others" case.
*Note: To create this campaign with the Google Ads Api I had to have a root 
Node -> everything else root node -> brand node > everything else in brand 
node -> product_item_id node.*
 {
//*SUBDIVISION*
entity: 'ad_group_criterion',
operation: 'create',
resource: {
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-1',
  ad_group: 'customers/2595901092/adGroups/157149367644',
  listing_group: [Object],
  negative: false,
  status: 2
}
  },
  {
// *UNIT*
entity: 'ad_group_criterion',
operation: 'create',
resource: {
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-2',
  ad_group: 'customers/2595901092/adGroups/157149367644',
  cpc_bid_micros: 40,
  listing_group: [Object],
  negative: false,
  status: 2
}
  },
  {
// *UNIT*
entity: 'ad_group_criterion',
operation: 'create',
resource: v {
  ad_group: 'customers/2595901092/adGroups/157149367644',
  resource_name: 'customers/2595901092/adGroupCriteria/157149367644~-3',
  cpc_bid_micros: 40,
  negative: false,
  status: 2,
  listing_group: [Object]
}
  }

*case_value (in order):*
[
//brand
  { product_brand: { value: 'american fyre designs' } },

//everything else in brand - 1st test does not contain this.
  { product_brand: {} },

  {
// product under brand
product_item_id: { value: 'shopify_us_5960181579931_37204494057627' }
  }
]
*Test 1 - Do not add 'Others Node' because it is "automatically created" 
according to the previous explanation (2 operations)*
Ed {
  errors: [
Sd {
  error_code: { criterion_error: 108 },
  message: 'Subdivided listing groups must have an "others" case.',
  trigger: { int64_value: Long { low: -1, high: -1, unsigned: false } },
  location: [
Pd { field_name: 'mutate_operations', index: 0 },
Pd { field_name: 'ad_group_criterion_operation' },
Pd { field_name: 'create' },
Pd { field_name: 'listing_group' },
Pd { field_name: 'type' }
  ],
},
Sd {
  error_code: { criterion_error: 106 },
  message: 'Ad group is invalid due to the listing groups it contains.',
  trigger: { int64_value: Long { low: -1, high: -1, unsigned: false } },
  location: [
Pd { field_name: 'mutate_operations', index: 1 },
Pd { field_name: 'ad_group_criterion_operation' },
Pd { field_name: 'create' },
Pd { field_name: 'listing_group' }
  ]
}
  ],
request_id: '9V0lNLIqNwZz2PtuK5Dmtw'

*Test 2 - Add everything else node again with case_value: {} (empty 
object) *
Ed {
  errors: [
Sd {
  error_code: criterion_error: 108,
  message: 'Subdivided listing groups must have an "others" case.',
  trigger: { int64_value: Long { low: -1, high: -1, unsigned: false } },
  location: [
Pd { field_name: 'mutate_operations', index: 0 },
Pd { field_name: 'ad_group_criterion_operation' },
Pd { field_name: 'create' },
Pd { field_name: 'listing_group' },
Pd { field_name: 'type' }
  ],
},
Sd {
  error_code: { field_error: 2 },
  message: 'The required field was not present.',
  location: [
Pd { field_name: 'mutate_operations', index: 1 },
Pd { field_name: 'ad_group_criterion_operation' },
Pd { field_name: 'create' },
Pd { field_name: 'listing_group' },
Pd { field_name: 'case_value' }
  ]
},
Sd {
  error_code: criterion_error: 106,
  message: 'Ad group is invalid due to the listing groups it contains.',
  trigger: { int64_value: Long { low: -1, high: -1, unsigned: false } },
  location: [
Pd { field_name: 'mutate_operations', index: 2 },
Pd { field_name: 'ad_group_criterion_operation' },
Pd { field_name: 'create' },
Pd { field_name: 'listing_group' }
  ]
}
  ],
  request_id: 'iQhvrUQYbKU3Zpc6o2V84g'
}

*Test 3 - Set case_value property to empty object (i.e. product_brand: {} 
)  *
Ed {
  errors: [
Sd {
  error_code: criterion_error: 108,
  message: 'Subdivided listing groups must have an "others" case.',
  trigger: { int64_value: Long { low: -1, high: -1, unsigned: false } },
  

Re: adgroupcriterionoperation - update listinggrouptype unit to subdivision

2024-02-20 Thread Jebron Lames
So, after I successfully remove the node and begin to recreate it as a 
subdivision with children, I am getting an error at index 1 where it says 
the 'listing_group already exists'. This is my "other's node" operation.

//new subdivided node
const updateSelectedNodeType = new resources.AdGroupCriterion({
resource_name: tempSubdivisionResource,
ad_group: adGroupResource,
listing_group: {
  parent_ad_group_criterion: parentNode,
  type: enums.ListingGroupType.SUBDIVISION,
  case_value: caseValue,
},
negative: false,
status: enums.AdGroupCriterionStatus.ENABLED,
  });
//everything else node
  const everythingElseNode = new resources.AdGroupCriterion({
resource_name: everythingElseResource,
ad_group: adGroupResource,
cpc_bid_micros: toMicros(0.4),
listing_group: {
  parent_ad_group_criterion: parentNode,
  type: enums.ListingGroupType.UNIT,
  case_value: everythingElseCaseValue,
},
negative: false,
status: enums.AdGroupCriterionStatus.ENABLED,
  });
 //partition object with set cpc.
const newPartition = new resources.AdGroupCriterion({
  ad_group: `customers/${customer}/adGroups/${adGroupId}`,
  resource_name: criterionResourceOperation,
  cpc_bid_micros: toMicros(0.4),
  negative: false,
  status: enums.AdGroupCriterionStatus.ENABLED,
  listing_group: {
parent_ad_group_criterion: parentAdGroupCriterion,
type: enums.ListingGroupType.UNIT,
case_value: caseValue,
  },
});


0//tempid -1 
 const updatePartitionToSubdivision: MutateOperation =
{
  entity: "ad_group_criterion",
  operation: "create",
  resource: {
...updateSelectedNodeType,
  },
};

1//tempid -2 - ERROR - LISTING_GROUP ALREADY EXISTS
  const createEverythingElseNodeOperation: MutateOperation =
{
  entity: "ad_group_criterion",
  operation: "create",
  resource: {
...everythingElseNode,
  },
};
  
2//tempid -3
 const addPartitionNodes: MutateOperation =
  {
entity: "ad_group_criterion",
operation: "create",
resource: newPartition,
  };


How do I find a node that doesn't currently exist in my active tree, remove 
it and make sure I am not removing the wrong node? 

I tried to query:
query = `
SELECT 
ad_group_criterion.criterion_id,
ad_group_criterion.listing_group.case_value.${caseValue},
ad_group_criterion.listing_group.parent_ad_group_criterion,
ad_group_criterion.listing_group.path,
ad_group_criterion.listing_group.type
FROM product_group_view
WHERE ad_group_criterion.listing_group.type = 'UNIT'
AND ad_group_criterion.listing_group.case_value.${caseValue} IS NULL
AND ad_group_criterion.listing_group.parent_ad_group_criterion = '${
selectedNode?.listing_group?.parent_ad_group_criterion}'
`;

with this line:  AND 
ad_group_criterion.listing_group.parent_ad_group_criterion = '${selectedNode
?.listing_group?.parent_ad_group_criterion}'

I get the one partition from my active tree that is already the "others 
node" for an already subdivided partition (done during creation).

when I remove the line targeting parent criterion, I am left with about 900 
partitions. So I am really interested in learning how this works. In terms 
of the data relationship and structure, how does one identify the "others" 
node of a specific partition when 1. the other's node does not currently 
exist in the current product_group_view where ad_group.id = ${adgroupId}?

my tree is like this for said ag_group > product_group_view:
I already have a brand node subdivided by product item id.
I now want to do the same the other unit node(**).
S = Subdivision
U = UNIT
** = convert UNIT to SUBDIVISION operation

   all products(S)
|
   **brand(U) 
-brand (S)
|  
 |
|  
item_id(U)
|  
  |
  ev else (all)
   ev else (brand1) (U)

Can you please confirm that i have to find the "other's node" and delete it 
despite it not existing in my current tree? 
2. I saw in your response that I should querying the ad_group_criterion 
resource? not the product_group_view? Is there a specific advantage using 
the ad_group_criterion in this case?

Kind Regards,
Michael H.

On Tuesday, February 20, 2024 at 3:26:43 AM UTC+7 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for reaching out to the Google Ads API support team.
>
> By reviewing 

Add/Remove partition tree for Shopping Campaign product_group_view

2024-01-21 Thread Jebron Lames
Hello team,

I am in the process of  adding/removing a subdivision in 
product_group_view. 

What resource would I want to query from in order to receive the available 
brands that can be selected and added using the google ads api REST 
interface? 

My current product group view  is (this was created in the Google Ads UI):
All Products > brands 

[image: product_groups_1.png]

On the Google ads UI -  when I click 'edit subdivision' I am able to see a 
list of all the available brands that can be included.

[image: product_group_subdivision.png]


and all available brands retrieved.

[image: product_group_subdivide_brands.png]

so, 'american outdoor grill' is already selected. I can also select other 
brands to add to the product groups.

Just curious, but can all this be accomplished with the Google ads api or 
is it necessary to use a combination of the content shopping api as well? 

kind regards,
Michael H.

 




-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ac21ef5b-f36c-4771-975d-feeef83b2b2dn%40googlegroups.com.


Re: retrieving product partition data - subdivisions & units

2024-01-15 Thread Jebron Lames

I haven't got a reply, but I just wanted to let you know I figured it out. 

I had to query from the product_group_view which gives me a lot of 
resources to work with along side metrics.  In the query I included 
ad_group_criterion.listing_group.parent_ad_group_criterion and 
ad_group_criterion.criterion_id to check for parent-child relationships to 
create the hierarchy tree. You wonderful people at google are insane. 

Styles, converting the cpc to the millionth & alignments aside(...I'm 
working on it), this is what I was trying to achieve, and it was a lot 
easier to achieve querying from product_group_view. Not sure if it's the 
best approach, but this is how I did it. 

[image: product_group_.png]

regards,
Michael H.

On Monday, January 8, 2024 at 2:26:38 PM UTC+7 Google Ads API Forum Advisor 
wrote:

> Hi, 
>
> Thank you for reaching out to the Google Ads API support team. 
>
> By reviewing your concern, I understand that you're seeking a particular 
> resource to retrieve both SUBDIVISIONS and UNITS concurrently within the 
> listing_group data. Could you please confirm if you are able to retrieve 
> this information from the Google Ads UI? If yes, I would request you to 
> kindly provide an uncropped UI screenshot of the Google Ads account and 
> highlight the fields that you want to retrieve via the API. 
>
> You can send the details via *Reply privately to the author option*, or 
> *direct 
> private reply* to this email.
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02rVC0B:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5797061d-df4d-4ab2-89d1-56747b2a8473n%40googlegroups.com.


Retrieving Product Partition Data - SUBDIVISIONS & UNITS

2024-01-07 Thread Jebron Lames
Hello,

I am currently working on a project where I need to construct a detailed, 
tree-like view of product partitions for shopping campaigns, including both 
subdivisions (intermediate nodes) and units (leaf nodes). 

I am in the process of retrieving listing_group data. I would like to know 
if there is a way to GET both SUBDIVISIONS and UNITS together. Or would I 
have to make two separate request and combine the data (someway on 
server-side or client)? 

My aim is to return the complete product partition tree for my currently 
active Google Ads Shopping campaigns. Right now I am under the impression I 
need to do both separately.

For Example I am using this query :
 SELECT 
  ad_group_criterion.listing_group.type, 
  ad_group_criterion.listing_group.case_value.product_type.level, 
  ad_group_criterion.listing_group.case_value.product_type.value, 
  ad_group_criterion.listing_group.case_value.product_item_id.value, 
  ad_group_criterion.listing_group.parent_ad_group_criterion, 
  ad_group_criterion.listing_group.path, 
  ad_group.id 
FROM ad_group_criterion 
WHERE 
  ad_group_criterion.listing_group.type = 'SUBDIVISION'  
  AND ad_group.id = ${adGroupId}

I mapped over the result and logged the object for listing_group.
(random numbers to remove my actual ids)

[
  {
type: 2,
case_value: null,
parent_ad_group_criterion: 'customers/customerId/adGroupCriteria/1~6',
path: xt { dimensions: [Array] }
  },
  {
type: 2,
case_value: null,
parent_ad_group_criterion: null,
path: xt { dimensions: [] }
  },
  {
type: 2,
case_value: { product_type: [Object], product_item_id: null }, 
parent_ad_group_criterion: 'customers/customerId/adGroupCriteria/1~6',
path: xt { dimensions: [Array] }
  }
]

I then logged the paths: 
[
  [ Ut { product_brand: [Kt] } ],
  [],
  [ Ut { product_brand: [Kt] }, Ut { product_type: [Xt] } ]
]
My impression is this is the root node, brand node and product type node, 
which would then lead to my product_item_ids.

Is it possible to query both subdivisions and units in the results? 

Kind Regards,
Michael H.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b1d3c99e-60fd-45d1-865b-29208621746dn%40googlegroups.com.


Question about Google Ads Api RMF - C.530 Create Local Inventory Ads

2023-12-07 Thread Jebron Lames
Hi,

In terms of the google ads API RMF for Item number C.530, what exactly does 
this require? Is the end user required to have set up the necessary 
information  (business details) and such?

I know creating a local inventory ad to primarily be something done on 
Google Shopping, so I was curious.

Thanks.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/7ad2c6d6-1be9-4ffa-8a8e-f9ba257ba6e0n%40googlegroups.com.


Product Partition by Brand for Google Shopping Campaign

2023-11-09 Thread Jebron Lames
Hello,

I had a question about the product partition and the relationship between 
parent and siblings.

My aim is to partition my shopping ads as such:
root
 product_brand
   product_item_id
  everything else in brand
everything else in all products

Meaning that when i create a shopping ad campaign, only the 
product_item_ids under the brand i created the campaign for are there. At 
least this is the desired result.

Issue:
Right now, my campaign creation includes the product_item_id under the 
brand, BUT also all other non-brand product_item_ids. The product_item_ids 
not under the brand show as ""this product group doesn't contain any 
products"" when hovered.  I've tried a few other variations and almost 
always leads to an error "'Dimension type of listing group must be the same 
as that of its siblings.'". This seems to be the working sample for me.

My question:
If I want to only show the products under the brand, in my create 
operations, how can I make sure the non-brand product_item_id is not being 
included?

here is a simplified example:

//1. root node - null - Parent
const rootNode: resources.IAdGroupCriterion = {
resource_name: RootNodeResourceName,
ad_group: adGroupName,
listing_group: {
  type: enums.ListingGroupType.SUBDIVISION,
},
status: enums.AdGroupCriterionStatus.ENABLED,
  };

  //2. brand node -> connected to root node
  const brandNode: resources.IAdGroupCriterion = {
resource_name: brandNodeResourceName,
listing_group: {
  parent_ad_group_criterion: rootNode.resource_name,
  case_value: {
product_brand: {
  value: campaign?.vendor.toLowerCase(),
},
  },
  type: enums.ListingGroupType.SUBDIVISION,
},
status: enums.AdGroupCriterionStatus.ENABLED,
  };

  //3. everything else in brandNode -> rootNode
  const otherBrandNode: resources.IAdGroupCriterion = {
resource_name: otherBrandNodeResourceName,
cpc_bid_micros: toMicros(fixedCpC),
listing_group: {
  case_value: {
product_brand: {},
  },
  parent_ad_group_criterion: rootNode.resource_name,
  type: enums.ListingGroupType.UNIT,
},
status: enums.AdGroupCriterionStatus.ENABLED,
  };

  productCriterionOptions.push(everythingElseInBrandsOperation);

  //4. others node - products not in brand or product_item_id
  const everythingElseNode: resources.IAdGroupCriterion = {
resource_name: everythingElseNodeResource,
cpc_bid_micros: toMicros(Number(fixedCpC)),
listing_group: {
  case_value: {
product_item_id: {},
  },
  parent_ad_group_criterion: brandNode.resource_name,
  type: enums.ListingGroupType.UNIT,
},
status: enums.AdGroupCriterionStatus.ENABLED,
  };

  //5. product_item_ids --> brandNode --> rootNode
const productItemNode: resources.IAdGroupCriterion = {
  resource_name: productItemIdNode,
  cpc_bid_micros: toMicros(Number(fixedCpC)),
  listing_group: {
parent_ad_group_criterion: brandNode.resource_name,
case_value: {
  product_item_id: {
value: productId,
  },
},
type: enums.ListingGroupType.UNIT,
  },
  status: enums.AdGroupCriterionStatus.ENABLED,
};

regards,
Michael

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9be91305-edfc-41b0-9607-40d66a769bf0n%40googlegroups.com.