@@ -52,8 +52,11 @@ SnowPlow.Tracker = function Tracker(argmap) {
5252 ************************************************************/
5353
5454 var
55+ // Get the referrer URL
56+ referrer = SnowPlow . getReferrer ( ) ,
57+
5558 // Current URL and Referrer URL
56- locationArray = SnowPlow . fixupUrl ( SnowPlow . documentAlias . domain , SnowPlow . windowAlias . location . href , SnowPlow . getReferrer ( ) ) ,
59+ locationArray = SnowPlow . fixupUrl ( SnowPlow . documentAlias . domain , SnowPlow . windowAlias . location . href , referrer ) ,
5760 domainAlias = SnowPlow . fixupDomain ( locationArray [ 0 ] ) ,
5861 locationHrefAlias = locationArray [ 1 ] ,
5962 configReferrerUrl = locationArray [ 2 ] ,
@@ -1545,6 +1548,29 @@ SnowPlow.Tracker = function Tracker(argmap) {
15451548 businessUserId = userId ;
15461549 } ,
15471550
1551+ /**
1552+ * Set the business-defined user ID for this user using the location querystring.
1553+ *
1554+ * @param string queryName Name of a querystring name-value pair
1555+ */
1556+
1557+ setUserIdFromLocation : function ( queryName ) {
1558+
1559+ var location = document . URL ;
1560+ businessUserId = SnowPlow . fromQuerystring ( queryName , location ) ;
1561+ } ,
1562+
1563+ /**
1564+ * Set the business-defined user ID for this user using the referrer querystring.
1565+ *
1566+ * @param string queryName Name of a querystring name-value pair
1567+ */
1568+
1569+ setUserIdFromReferrer : function ( queryName ) {
1570+
1571+ businessUserId = SnowPlow . fromQuerystring ( queryName , referrer ) ;
1572+ } ,
1573+
15481574 /**
15491575 * Toggle whether to attach User ID to the querystring or not
15501576 *
@@ -1553,7 +1579,7 @@ SnowPlow.Tracker = function Tracker(argmap) {
15531579 * cookie). So there's no need to enable or disable specific user IDs.
15541580 *
15551581 * @param bool attach Whether to attach User ID or not
1556- */
1582+ */
15571583 attachUserId : function ( attach ) {
15581584
15591585 if ( typeof console !== 'undefined' ) {
0 commit comments