@segment/analytics.js-integration-doubleclick-floodlight
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -0,2 +1,6 @@ | ||
1.3.0 / 2017-05-10 | ||
================== | ||
* Support page calls as conversion events. | ||
1.2.3 / 2017-04-07 | ||
@@ -3,0 +7,0 @@ ================== |
@@ -90,1 +90,6 @@ 'use strict'; | ||
Floodlight.prototype.page = function(page) { | ||
var name = page.fullName(); | ||
if (name) this.track(page.track(name)); | ||
}; |
{ | ||
"name": "@segment/analytics.js-integration-doubleclick-floodlight", | ||
"description": "The DoubleClick Floodlight analytics.js integration.", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "analytics.js", |
@@ -41,2 +41,11 @@ 'use strict'; | ||
} | ||
}, | ||
{ | ||
key: 'Viewed Confirmation Page', | ||
value: { | ||
event:'Viewed Confirmation Page', | ||
cat: 'activityiTag', | ||
type: 'groupTag', | ||
customVariable: [] | ||
} | ||
} | ||
@@ -120,3 +129,33 @@ ] | ||
}); | ||
describe('page', function() { | ||
beforeEach(function() { | ||
analytics.spy(floodlight, 'load'); | ||
}); | ||
var sandbox; | ||
beforeEach(function() { | ||
// stubbing cachebuster logic | ||
sandbox = sinon.sandbox.create(); | ||
}); | ||
afterEach(function() { | ||
sandbox.restore(); | ||
}); | ||
it('should fire a floodlight tag for named pages mapped as events', function() { | ||
var iframe = '<iframe src="https://' + options.source + '.fls.doubleclick.net/activityi' | ||
+ ';src=' + options.source | ||
+ ';type=' + options.events[1].value.type | ||
+ ';cat=' + options.events[1].value.cat | ||
+ ';dc_lat=;dc_rdid=;tag_for_child_directed_treatment=' | ||
+ ';ord=2700503028455676400?">'; | ||
analytics.page('Confirmation'); | ||
analytics.called(floodlight.load); | ||
analytics.loaded(iframe); | ||
}); | ||
}); | ||
describe('noops', function() { | ||
@@ -123,0 +162,0 @@ it('should noop if no mapped tags are found for an event', function() { |
20869
375