filters in Google Analtyics API's not working in AW Script

155 views
Skip to first unread message

David Ogletree

unread,
May 8, 2017, 12:31:42 AM5/8/17
to AdWords Scripts Forum
This is specific to my AdWords script not sending the correct filter. It strips out extra zero's.

I am writing a script that accesses the Google Analytics Multi-Channel Funnels Reporting API. 

About Filters:

Everything is working great except that I can't get filters to work right.

Here is the filter I'm using.

'filters': 'mcf:conversionType==Transaction;mcf:timeLagInDaysHistogram<=090,mcf:pathLengthInInteractionsHistogram>=000001'

This gives me the error:

Invalid value 'mcf:timeLagInDaysHistogram<=90' for filters parameter. (line 12)

If I took out the Lag part it would give same error for Length.

The docs say that I need to use a padded zero string.

"The length of conversion paths in number of days. The value is a histogram across a range of possible values. Format is a 3-digit zero-padded string representing an integer. For example, time lag of 3 days is represented as "003"."
"The length of conversion paths in number of interactions. The value is a histogram across a range of possible values. Format is a 6-digit zero-padded string representing an integer. For example, path length of 4 is represented as "000004"."

It works just fine if I use == but as soon as I use something else it errors out.


David Ogletree

unread,
May 8, 2017, 12:40:03 AM5/8/17
to AdWords Scripts Forum
Here is the complete call:
 
var results = Analytics.Data.Mcf.get('ga:' + profileId, startDate, endDate, 'mcf:totalConversions', // List of all metrics to retrieve.
{
'dimensions': 'mcf:campaignPath',
  'filters': 'mcf:conversionType==Transaction;mcf:timeLagInDaysHistogram<=090,mcf:pathLengthInInteractionsHistogram>=000001'
});

Vincent Racaza (AdWords Scripts Team)

unread,
May 8, 2017, 1:16:00 AM5/8/17
to AdWords Scripts Forum
Hi David,

The issue in the filter of your script seems to be Google Analytics specific. You can contact their support for your concerns since they can provide better assistance on this.

Thanks,
Vincent Racaza
AdWords Scripts Team

David Ogletree

unread,
May 8, 2017, 3:37:32 AM5/8/17
to AdWords Scripts Forum on behalf of Vincent Racaza (AdWords Scripts Team)
No analytics api works fine. Adwords is sending the wrong data. It is stripping off my my zeros. 


--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to a topic in the Google Groups "AdWords Scripts Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-scripts/-LWNYFzFRSg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/a9234c11-ba5d-4b5e-bca7-a8d0ff5c8a9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vincent Racaza (AdWords Scripts Team)

unread,
May 8, 2017, 3:58:19 AM5/8/17
to AdWords Scripts Forum
Hi David,

Could you provide to me your CID and the name of the script so I could further investigate? Please use Reply privately to author option.
Reply all
Reply to author
Forward
0 new messages