3

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 hand
  • adGroupId the Adwords Adgroup ID. I have this to hand
  • authuser=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:

See https://help.trueclicks.com/en/articles/4103130-account-level-deep-linking-to-google-ads-from-trueclicks

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!

5
  • You haven't specified what your tool is. I presume you get to the url you specified by navigating through one or more pages in the adwords site. I imagine the ocid is transitory and generated on the fly. You could simulate this by web requests if necessary posting the necessary data. Dec 8 '17 at 13:24
  • @RobSedgwick: My tool is a custom webapp that I am writing. Yes, I reached that URL by navigating through the adwords admin site. I am hoping that the ocid is deterministic, and that the recipe is known or can be reverse-engineered. It doesn't seem to change from visit to visit.
    – Rich
    Dec 10 '17 at 13:09
  • Someone should check if this is even still a thing. Google Ads API has changed quite a bit Oct 7 '21 at 1:01
  • @MikeCiffone: What do you mean by "this is even still a thing"? The GA API has changed in the past year but you can still view campaigns in the GA web app and you still need an OCID to deep link to that.
    – Rich
    Oct 7 '21 at 12:43
  • 1
    @Rich, I think he was asking if this is still an issue given the changes. It sounds like it is. Oct 7 '21 at 13:30
3

My solution, for the account level:

https://adwords.google.com/aw/overview?__e=1234567890

If the account ID is 123-4567-890.

2
  • Yes. A link like this - https://ads.google.com/aw/overview?campaignId=123&adGroupId=123&__e=1234567890 should do the job for OP. The link seems to work for me with MCC account. Mar 22 '19 at 8:15
  • That doesn't work for me; if I put my customerid into "__e" it still takes me to a "Use Google Ads as..." selection page, then to the MCC homepage for a different customerId
    – Rich
    Oct 6 '21 at 16:06
2

You can debug the ajax request when you search for a client in your mcc (post call to https://adwords.google.com/aw/_/rpc/ClientCustomerService/List?authuser=0&rpcTrackingId=ClientCustomerService.List%3A27) It is possible to search for account IDs.You get an answer with the ocid. Maybe this is helps you.

2
  • Can you pretty please give a brief explanation of what you mean and what a ocid is? Would really appreciate it! Aug 22 '19 at 3:51
  • I couldn't get this to work. What can I send for the POST body? The ajax captured request has quite a lot in the body, and it doesn't look stable. An empty body just gives 400
    – Rich
    Oct 6 '21 at 20:00
-1

https://adwords.google.com/aw/overview?campaignId

https://adwords.google.com/aw/overview?campaignalvalue=$}}

== {{int:filedesc}} ==
{{Information
|Description={{en|Version of an image of a credit card}}
|Source=Author
|Date=2009-12-5 02:08 (UTC)
|Author=[[:en:User:Chairsenses|Chairsenses]] ([[:en:User talk:Chairsenses|talk]]) 02:08, 5 December 2009 (UTC)
|Permission=
|other_versions=
}}
1
  • I don't see how this answers the question. Your links don't work and you don't tay how the filedesc you give should be used. Dec 6 '17 at 10:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.