Skip to content

Instantly share code, notes, and snippets.

@RoyBellingan
Last active July 22, 2022 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RoyBellingan/28eab4d5912b336ce11737f7e32fcd4e to your computer and use it in GitHub Desktop.
Save RoyBellingan/28eab4d5912b336ce11737f7e32fcd4e to your computer and use it in GitHub Desktop.
bing.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:ns2="https://bingads.microsoft.com/Reporting/v13" xmlns:tns="https://bingads.microsoft.com/Reporting/v13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<tns:AuthenticationToken>OMISSIS</tns:AuthenticationToken>
<tns:CustomerAccountId>XYZ</tns:CustomerAccountId>
<tns:CustomerId>XYZ</tns:CustomerId>
<tns:DeveloperToken>XYZ</tns:DeveloperToken>
</SOAP-ENV:Header>
<ns0:Body>
<ns2:SubmitGenerateReportRequest>
<ns2:ReportRequest xsi:type="ns2:AgeGenderAudienceReportRequest">
<ns2:ExcludeReportFooter>true</ns2:ExcludeReportFooter>
<ns2:ExcludeReportHeader>true</ns2:ExcludeReportHeader>
<ns2:Format>Csv</ns2:Format>
<ns2:ReportName>My Ads Performance Report</ns2:ReportName>
<ns2:ReturnOnlyCompleteData>false</ns2:ReturnOnlyCompleteData>
<ns2:Aggregation>Daily</ns2:Aggregation>
<ns2:Columns>
<ns2:AgeGenderAudienceReportColumn>AdGroupName</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>TimePeriod</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>AdGroupId</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>AdDistribution</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>AgeGroup</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Gender</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Impressions</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Clicks</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Conversions</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Spend</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>ExtendedCost</ns2:AgeGenderAudienceReportColumn>
<ns2:AgeGenderAudienceReportColumn>Assists</ns2:AgeGenderAudienceReportColumn>
</ns2:Columns>
<ns2:Scope>
<ns2:AccountIds>
<ns1:long>154004153</ns1:long>
</ns2:AccountIds>
</ns2:Scope>
<ns2:Time>
<ns2:CustomDateRangeEnd>
<ns2:Day>26</ns2:Day>
<ns2:Month>11</ns2:Month>
<ns2:Year>2019</ns2:Year>
</ns2:CustomDateRangeEnd>
<ns2:CustomDateRangeStart>
<ns2:Day>26</ns2:Day>
<ns2:Month>11</ns2:Month>
<ns2:Year>2019</ns2:Year>
</ns2:CustomDateRangeStart>
<ns2:ReportTimeZone>PacificTimeUSCanadaTijuana</ns2:ReportTimeZone>
</ns2:Time>
</ns2:ReportRequest>
</ns2:SubmitGenerateReportRequest>
</ns0:Body>
</SOAP-ENV:Envelope>
@volomike
Copy link

Roy, do you know how to do an offline conversion with Bing Ads using raw HTTP POST with these soap XML statements like this, without having to use an SDK? See, Google Ads now has a REST API for doing offline conversions. Instead of the mountain of docs and library goo and the 5 minute SDK library upload to the server, I used the REST API instead of SOAP and was able to do the offline conversions with hundreds of conversions in just 2 REST API calls -- one to generate the access token (oAuth2), and another to do the actual offline conversion bulk update. So now I'm trying to figure out how to get this working with Bing Ads without using the bulky SOAP.

@RoyBellingan
Copy link
Author

RoyBellingan commented Jul 22, 2022

Hi @volomike, sorry I do not recall on the fly of ever having done the offline conversion for bing...
I will check in the source code of our project but, I fear I never did that.

In general and if possible should be detailed more or less here https://docs.microsoft.com/en-us/advertising/campaign-management-service/addconversiongoals?view=bingads-13 ?

If you check the example https://docs.microsoft.com/en-us/advertising/guides/code-example-offline-conversions?view=bingads-13 the conversionGoals is the actual working part inside...

And btw yes I do 100% agree with you, they did a miserable job of hiding something quite simple (the JSON rest api for google ads) behind a wall of nonsensical (and buggy) API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment