Expand my Community achievements bar.

channelManager doesn't work with DTM+AppMeasruement

Avatar

Level 3

I am now in a process of migration from s_code with channelManager plug-in v2.45 to the AppMeasurement. As far as I can see this version of the plugin is not compatible with the AppMeasurment and causes this issue (visible in Developer Tools' Console):

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

This is caused by this line:

s.channelManager('utm_campaign', ':', 'c_cmp');

I've already tried these modifications to the plugin code: used s.Util.getQueryParam instead of s.getQueryParam, s.Util.cookieRead() instead of s.c_r() and s.Util.cookieWrite() instead of s.c_w().

I see 2 possible ways of solving it:

1) New version of the plugin. Do you happen to have it?

2) As I need this plugin only to detect the organic search engine + the search query and as far as I can see the list of the search engines is pre-defined in the plugin (is that true?), wouldn't be enough to just look at the document.referrer to obtain the same results? Or is there any additional logic within channelManager that I would miss?

For example:

a)

document.referrer = http://www.google.com?q=branded_keyword

Result:SEO - Branded:Google:branded_keyword

b) 

document.referrer = http://www.bing.com

Result: SEO - non Branded:Microsoft Bing:keyword unavailable

What do you think?

0 Replies