Unique Criterion ID

1,442 views
Skip to first unread message

Harris

unread,
Nov 18, 2009, 12:28:26 PM11/18/09
to AdWords API Forum
Hi All,

I was just inserting some keyword criterions in the sandbox
environment. When i looked at the values that were returned to me i
saw something strange.
Ik get some criterions with the same ID. It only occurs when i insert
keywords with the same values (also when i insert them in other
groups)
Is this normal? Does it also works like this in real environment?
Because otherwise you can not easily identify an criterion, because
you have multiple items with the same criterion id and adgroupid. So
how to identify an criterion ?!

Regards, Harris

AdWords API Advisor

unread,
Nov 18, 2009, 2:16:30 PM11/18/09
to AdWords API Forum
Hi Harris,

Criterion IDs are globally unique in the system, which means they are
the same across ad groups, campaigns, etc. If two criteria have the
same information they will have the same ID. This is not a problem
however, since you can't add a criterion twice to the same ad group.

Best,
- Eric Koleda, AdWords API Team

doug s

unread,
Nov 18, 2009, 5:06:34 PM11/18/09
to AdWords API Forum
Actually could you please provide clarify this statement in more
detail: "If two criteria have the same information they will have the
same ID."

Which fields are used to generate the id? text, match type, and what?
Does the destination url factor in? Is text case sensitive?

I have downloaded many keywords that have different ids even though
the text and matchtype is almost identical, except for case of the
text, for example:

Mumbai hotels Phrase
mumbai hotels Phrase

These two do have different destination URLs though... is that why
they have different google ids?

The reason I ask is because in our application we need to prevent
users from inserting duplicate keywords under the same adgroup.


On Nov 18, 11:16 am, AdWords API Advisor

AdWords API Advisor

unread,
Nov 18, 2009, 5:35:02 PM11/18/09
to AdWords API Forum
Hi Doug,

I explain more of the details in this thread:

http://groups.google.com/group/adwords-api/browse_thread/thread/75988d471574b15f.

The fields of a criterion must match exactly to have the same ID,
including case. This is why your two example keywords would have
different IDs. Keep in mind though that the AdWords ad serving system
handles keywords without case sensitivity, so there is no need to add
multiple cases of the same keyword:

http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=13846.

Best,
- Eric

Harris

unread,
Nov 18, 2009, 5:43:00 PM11/18/09
to AdWords API Forum
I think the system only looks at the criterion->text and criterion-
>matchType.
I just tested this out, and when you change the matchType, it saves
the criterion with a new id.
When you add just an destinationUrl, the criterion returns with the
same id.
I also found out that when you add an criterion with the same data,
the system returns just the criterion that is already in the system
with that data

AdWords API Advisor

unread,
Nov 18, 2009, 6:17:02 PM11/18/09
to AdWords API Forum
Hi Harris,

That is correct. As I explained in the linked thread the v2009
Criterion objects contain all the fields that are part of the
criterion. For example, Keyword object only contains the text and
matchType fields: http://code.google.com/apis/adwords/v2009/docs/reference/AdGroupCriterionService.Keyword.html.

Best,
- Eric
Reply all
Reply to author
Forward
0 new messages