How do I search for ads with a non-empty tracking template

19 views
Skip to first unread message

Rob

unread,
Jun 14, 2017, 3:50:16 PM6/14/17
to AdWords API Forum
Hi,

I'm trying to run structure reports to find ads that have non-empty tracking templates.

I've added the following predicate, but both the report service and the AdGroupAd service responses include ads with empty templates.

<predicates><field>CreativeTrackingUrlTemplate</field><operator>NOT_EQUALS</operator><values></values></predicates>

Is this a bug or should I change the predicate? Although the STARTS_WITH operator works (e.g. "starts with http" or "starts with {lpurl}"), the template could start with a few different things and that doesn't feel like the right approach.

Shwetha Vastrad (AdWords API Team)

unread,
Jun 14, 2017, 7:31:08 PM6/14/17
to AdWords API Forum
Hi Rob,

I'm afraid you cannot use null values in the predicate. You could consider using AdGroupAdService to get the ads and check if the trackingUrlTemplate is populated. If the trackingUrlTemplate is not set, the Ad Performance Report will contain two dashes (--) indicating that there is no value for this cell.

Regards,
Shwetha, AdWords API Team.

Rob

unread,
Jun 15, 2017, 9:00:04 AM6/15/17
to AdWords API Forum
Thanks Shwetha,

That's not ideal, we're hitting various timeouts built into in our systems because of the time it takes AdWords to generate a report for certain large clients (millions of ads), and even then we don't want the network overhead of downloading large reports where we only want a few of the rows.

It would be great to be able to filter by empty values, so could that be supported?

Rob.

Shwetha Vastrad (AdWords API Team)

unread,
Jun 15, 2017, 2:49:49 PM6/15/17
to AdWords API Forum
Hi Rob,

I'll get in touch with the team to add support for empty values in predicates. Please keep an eye on the Google Ads Developer blog for any updates or announcements. 
Reply all
Reply to author
Forward
0 new messages