I am writing a tool to help manage Google Adwords campaigns.
I would like to be able to deep-link to the page for an adgroup in the Adwords web UI from my tool.
For example, the following is the URL of the Overview page for an Adgroup in the Adwords web UI:
https://adwords.google.com/aw/overview?campaignId=123&adGroupId=123&ocid=123&authuser=0&__c=123&__u=123
(I have replaced all IDs with "123" above, for privacy)
From a little experimentation, I have determined the meaning of the query string parameters as follows:
campaignId
the Adwords Campaign ID. I have this to handadGroupId
the Adwords Adgroup ID. I have this to handauthuser=0
,__c
,__u
the page works fine without these params, so I can omit them from my links. (If I do not omit these params, then links for other users are HTTP 401 for me.)ocid
-- This appears to control the selected Account in the web UI. If I remove this param, then the page loads but does not show the correct context, so it isn't useable.
The ocid
param is the sticking point for me. It appears to relate to the selected Account or selected Campaign in the UI, but it does not match the Account ID or Campaign Id that I have, so I can't generate it.
Does anyone know how to deep-link to an AdGroup in the admin UI, either by generating valid ocid
values from an Account Id or a Campaign Id, or by some other means?
Update Oct 2021: TrueClicks can't see how to obtain this param either
The GA management tool, "TrueClicks" (with which I am not affiliated), can't see how to get the "ocid" param from GA either, and (like me) they want to use it to create deep links into the GA web UI:
Each Google Ads account has a so-called OCID that TrueClicks can't get from the API. So for us to provide you deep links to the right ad group or campaign for each of our checks, we need the OCID for the corresponding account.
... so this is strong circumstantial evidence that this param is not derivable from GA's API, which is a shame. Let me know if you know otherwise!
ocid
is deterministic, and that the recipe is known or can be reverse-engineered. It doesn't seem to change from visit to visit.