ocid in https://adwords.google.com URL's

4,428 views
Skip to first unread message

John Bliss

unread,
Dec 21, 2017, 1:10:27 PM12/21/17
to AdWords API Forum
I'm attempting to programmatically build emails with deep-links our Campaign Managers can click to get directly to where they need to go within our AdWords. For example:


The only part of that that I do not have, I think, is this:

ocid=1234

Is that a value I can "touch" via the API? If so, where will I find it?

Dhanya Sundararaju (AdWords API Team)

unread,
Dec 21, 2017, 7:35:44 PM12/21/17
to AdWords API Forum
Hi John,

Deep linking is not supported in AdWords. However, you may be able to set up deep links at your application level. To populate the data in your application, you could use the various report types and services that AdWords API supports.

Regards,
Dhanya, AdWords API Team
Message has been deleted

Alon Diamant

unread,
Feb 15, 2018, 3:18:27 PM2/15/18
to AdWords API Forum

My solution, for the account level:

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

If the account ID is 123-4567-890.


wij...@trueclicks.com

unread,
Jun 5, 2018, 9:40:20 AM6/5/18
to AdWords API and Google Ads API Forum
Hi Dhanya,

Is this still the case? It would be fantastic if Google would support simple deep linking based on campaign id and agroupid, and the urls seem ready for it with a structure like:


Except that ocid part that is unclear. 

Hope this will be possible in the near future, could you let us know if Google plans to support deep linking?

Best Regards,

Wijnand
Message has been deleted

John M Bliss

unread,
Jun 5, 2018, 12:49:39 PM6/5/18
to AdWords API and Google Ads API Forum
> It would be fantastic if Google would support simple deep linking based on campaign id and agroupid

+1

On Mon, Jun 4, 2018 at 2:21 PM, <wij...@trueclicks.com> wrote:
Hi Dhanya,

Is this still the case? Easy deep linking would be a very welcome USP for the new AdWords interface (that people have a hard time adopting) and I honestly don't see why Google would not support it.

The URLs of the new interface are very suitable for deep linking with a structure like https://adwords.google.com/aw/keywords?campaignId=1234567890&adGroupId=12345678901&ocid=123456789 with the exception of the ocid part that is a big but required mystery to all of us.

Really hope that easy deep linking based on campaignId and adGroupId will be possible in the near future.

Best regards,

Wijnand

On Thursday, December 21, 2017 at 8:35:44 PM UTC+1, Dhanya Sundararaju (AdWords API Team) wrote:

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/1PsVZtuy04s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/880fac01-718a-4794-a1fd-f529973188f5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Dhanya Sundararaju (AdWords API Team)

unread,
Jun 5, 2018, 2:52:42 PM6/5/18
to AdWords API and Google Ads API Forum
Hi Wijnand, John, 

I am unaware when deep linking will be supported in AdWords. Since its a popular request, I can pass it on to our team. However, please do watch out the blog for updates on future releases. 

wij...@trueclicks.com

unread,
Jun 5, 2018, 9:56:41 PM6/5/18
to AdWords API and Google Ads API Forum
Hi Dhanya,

It would be great if you could pass this request on, as it would make the life of many teams working in AdWords much easier (by enabling them to share deep links with their colleagues) and with that, give users a good reason to switch to the new interface.

Best regards,

Wijnand

Jacek Szarski

unread,
Jun 18, 2018, 8:19:46 PM6/18/18
to AdWords API and Google Ads API Forum
Hi Dhanya,

I run into the same problem. I'm developing an app that deals whith AdWords users' campaign data.

One of the features that we want to implement is to allow the user to click on a campaign name and be redirected to their AdWords admin panel.
Unfortunately even though we know their campaign ID, we can't build a valid link unless we have a way to get the `ocid` parameter. It seems like it's required for the site to work but it can't be found in the API docs anywhere.

Is there another way to generate a link to user's campaign admin panel, knowing the data available though the API?

Best,
Jacek Szarski
Message has been deleted

Dhanya Sundararaju (AdWords API Team)

unread,
Jun 19, 2018, 4:52:20 PM6/19/18
to AdWords API and Google Ads API Forum
Hi Jacek,

Deep linking is not supported in AdWords API. So, unfortunately, I will not be able to provide a solution for it. Please keep an eye on the blog for updates on future releases. 

Jens

unread,
Aug 7, 2018, 8:22:30 PM8/7/18
to AdWords API and Google Ads API Forum
Deep linking to the AdWords management UI has been a topic for so many years.
With the old interface it was at least possible to deep link to a search result: https://adwords.google.com/mcm/Mcm?#c.ac:s._123-456-7890
This has also gone now with the new interface.
You're making the life of resellers and multi account managers really hard. These people are spending so much money on Google Ads and even such a simple feature cannot be done?

Please add some way to deep link from external management systems directly to the Ads UI again.

Thanks, Jens

Dhanya Sundararaju (AdWords API Team)

unread,
Aug 8, 2018, 4:40:32 PM8/8/18
to AdWords API and Google Ads API Forum
Hi Jens,

I completely understand your concern. We do get this request quite often. Unfortunately, it is not possible to have that link. Please do post your concern on the Advertiser Community Forum so that the product experts there will be able to provide their suggestions. 
Message has been deleted

Meijun Xing

unread,
Aug 16, 2018, 7:26:15 AM8/16/18
to AdWords API and Google Ads API Forum

Trevor

unread,
Aug 21, 2019, 8:51:56 PM8/21/19
to AdWords API and Google Ads API Forum
Looks like this may have broken recently, now links with only the __e parameter are resolving to the account selector and then taking me to the MCC overview

Google Ads API Forum Advisor Prod

unread,
Aug 22, 2019, 6:52:08 AM8/22/19
to adwor...@googlegroups.com
Hi Trevor,

Thank you for reaching out.

Since this is already an old thread, could you open your concern on a new one providing the complete details for better tracking?

Also, deep links are still not available in the API. You may keep an eye on our blog for more updates and announcement regarding the API.

Regards,
Dannison
Google Ads API Team

ref:_00D1U1174p._5001UHEIuy:ref

Kamil

unread,
Aug 22, 2019, 8:28:39 AM8/22/19
to AdWords API and Google Ads API Forum
Nooo, why __e stoped working? it also not possible to gain ocid by adwords api. Why you broke this feature?
Looks like we will have to scrape all ocid from each account and assign it to account number.

Good change google...

Alon Diamant

unread,
Aug 22, 2019, 8:42:30 AM8/22/19
to AdWords API and Google Ads API Forum
Kamil,

Could you share how you scare the ocid? Where do you scrape it from?

Also, if anyone has any other solution, or creates a new thread - please link to it here, as well.

Thank you.

Kamil

unread,
Aug 22, 2019, 9:14:12 AM8/22/19
to AdWords API and Google Ads API Forum
The best thing is that, now you cannot even redirect from analytics to google ads, because its generating 404.

Acqisition/Google Ads/Campaigns 

Good job google, you broke even your own features!!!

Lukas Kelling

unread,
Aug 22, 2019, 9:32:22 AM8/22/19
to AdWords API and Google Ads API Forum
Yes, please share how to retrieve the ocid parameter per account.

Kamil

unread,
Aug 22, 2019, 10:03:40 AM8/22/19
to AdWords API and Google Ads API Forum
Open main mcc, then Accounts / Management / show 500 accounts per page

Open developer tools, select <html> tag and click "edit as html". Copy all the content and put this content to new file called "google_html.txt"

create php script ocid.php with content:

<?php
$html = file_get_contents('google_html.txt');

preg_match_all('|<a.*?href="/aw/[^?]+\?ocid=([^&]+)&[^>]+>([^<]+)</a><!----></div><!----><div class="[^"]+">([^<]+)|',$html,$result,PREG_SET_ORDER);

foreach($result as $record) {
echo $record[1].';'.$record[3].';'.$record[2]."<br>";
}
?>

when you execute script, it will print out all accounts ocid, all names, and all id

Lukas Kelling

unread,
Aug 22, 2019, 11:21:35 AM8/22/19
to AdWords API and Google Ads API Forum
Alright, makes sense. Thank you very much!

Myles

unread,
Mar 28, 2022, 6:38:18 PM3/28/22
to Google Ads API and AdWords API Forum
How is this still not a thing?  I don't understand Google's idea around keeping this "hidden" from us, it just makes it annoying for our account managers to have to switch from systems and search for this.  We're literally a Google Partner for Ads and still can't get anything out of you guys regarding this.  I'm so disappointed in you Google.

Google Ads API Forum Advisor

unread,
Mar 28, 2022, 6:47:54 PM3/28/22
to my...@tarkenton.com, adwor...@googlegroups.com
Hello,

The UI is subject to change at any time, so there's no guarantee a deep link from today would work tomorrow. Therefore, we don't recommend scraping to construct deep links. The ocid also isn't relevant in any API context, so we don't expose it in the API. We have had a few feature requests for deep linking again recently, and the team is considering it. However, I cannot comment on our future plans with any certainty.

Regards,
Mike, Google Ads API Team

ref:_00D1U1174p._5001UHEIuy:ref

rajkow...@gmail.com

unread,
May 24, 2022, 11:03:21 AM5/24/22
to Google Ads API and AdWords API Forum
I made better workaround, than I posted above with PHP.

You can do it faster by JS:

<script>
// Open settings/sub-account settings https://ads.google.com/aw/settings/subaccounts
// SET: Show rows:500
// Scroll to the bottom of page to get all stuff loaded to the memory
// Open developer tools (CTRL + SHIFT + J)
// Paste code into developer console:

// START
var ocid = document.querySelector('html').innerHTML;
var matches = Array.from(ocid.matchAll(/<a.*?href="\/aw\/[^?]+\?ocid=([^&]+)&[^>]+>([^<]+)<\/a><!----><\/div><!----><div class="[^"]+">([^<]+)/g));
var output = [];
matches.forEach(element => {
    var customer_id = element[3].replaceAll('-','');
    var ocid = element[1];
    var name = element[2];
    output.push(customer_id + ';' + ocid + ';' + name);
});
output = output.join("\n");
copy(output);
// END

// now, you have first 500 accounts copied to clipboard in following format: customer_id ; ocid ; name
// by Kamil Rajkowski
</script>

Harsha Nandiwada

unread,
Jul 21, 2022, 7:36:15 PM7/21/22
to Google Ads API and AdWords API Forum
+1 We need this feature as well, whether it's OCID or some other way to link to this page
The closest I can get is 
but that still relies on OCID.

Google Ads API Forum Advisor

unread,
Jul 22, 2022, 7:43:49 AM7/22/22
to har...@trackstarhq.com, adwor...@googlegroups.com
Hi Harsha,

Thank you for the reply.

As per my colleague Michael said, ”the ocid also isn't relevant in any API context, so we don't expose it in the API. We have had a few feature requests for deep linking again recently, and the team is considering it. However, I cannot comment on our future plans with any certainty.” With this, I would suggest you to follow the blog post for updates and new releases.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5001UHEIuy:ref

林尧昌

unread,
Apr 24, 2023, 4:03:39 AM4/24/23
to Google Ads API and AdWords API Forum
Is there any further progress on the deep linking feature?

Google Ads API Forum Advisor

unread,
Apr 24, 2023, 8:26:52 AM4/24/23
to aspir...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for bumping this thread. I hope that you are doing well today.

With regard to the deep linking feature, please note that we don't have any update yet when will this feature become available in the API. What we can do is to advise you to keep an eye on our blog post and release notes for the updates and releases.

Reference links:
Kind regards,
Google Logo Google Ads API Team


ref:_00D1U1174p._5001UHEIuy:ref

Ludwig

unread,
Dec 27, 2024, 12:07:49 AM12/27/24
to Google Ads API and AdWords API Forum
Any news on this being put on the roadmap? It would be very great to have this feature.

Google Ads API Forum Advisor

unread,
Dec 27, 2024, 4:05:03 AM12/27/24
to ad-m...@franco-consulting.com, adwor...@googlegroups.com
Hi,

The deep linking feature is not yet supported in the Google Ads API. We cannot provide a scheduled timeline for the availability of this feature in the Google Ads API. With that being said, I would recommend you to follow our blog post and release notes for announcements about new API releases and features.

This message is in relation to case "ref:!00D1U01174p.!5001U0HEIuy:ref" (ADR-00013256)

Thanks,

 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5



Reply all
Reply to author
Forward
0 new messages