From ab9bbabb6fec6b8780928440e7c5a145f02c489a Mon Sep 17 00:00:00 2001 From: Zlatin Zlatev Date: Mon, 7 Jul 2014 10:42:10 +0300 Subject: [PATCH] Explore attributes: registration tag, names Amended explore attributes logic to work also for Registration tags; Added name of the explore attribute so that it is clear which http parameter is used. --- gettags.js | 4 ++-- tagwindow.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gettags.js b/gettags.js index d7ba5ae..a466106 100644 --- a/gettags.js +++ b/gettags.js @@ -89,11 +89,11 @@ chrome.webRequest.onBeforeSendHeaders.addListener( // explore attributes for the different coremetrics tags // get all query parameters matching ..._a99 pattern - pv_a99, pr_a99, s_a99, o_a99, etc. - var exploreAttributesPattern = /_a([\d]+)$/; + var exploreAttributesPattern = /(_a|rg)([\d]+)$/; var exploreAttributes = Object.keys(queryString).filter( function(element) {return exploreAttributesPattern.test(element)} ); for (index=0; indexAttribute '+attributeNameIndex+' (Explore)' + request[attributeName] + '' : ''); + attributeNameIndex = exploreAttributesPattern.exec(attributeName)[2]; + result = result + (request[attributeName] ? 'Attribute '+attributeNameIndex+' (Explore) ('+attributeName+')' + request[attributeName] + '' : ''); } return result; })() +