@segment/analytics.js-integration-doubleclick-floodlight
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -0,1 +1,6 @@ | ||
1.4.2 / 2018-02-23 | ||
================== | ||
* Prep for mixed component migration | ||
1.4.1 / 2018-01-24 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -12,2 +12,3 @@ 'use strict'; | ||
var find = require('obj-case').find; | ||
var toNoCase = require('to-no-case'); | ||
@@ -21,4 +22,3 @@ /** | ||
.tag('counter', '<iframe src="https://{{ src }}.fls.doubleclick.net/activityi;src={{ src }};type={{ type }};cat={{ cat }};dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord={{ ord }}{{ customVariables }}?">') | ||
.tag('sales', '<iframe src="https://{{ src }}.fls.doubleclick.net/activityi;src={{ src }};type={{ type }};cat={{ cat }};qty={{ qty }};cost={{ cost }};dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord={{ ord }}{{ customVariables }}?">') | ||
.mapping('events'); | ||
.tag('sales', '<iframe src="https://{{ src }}.fls.doubleclick.net/activityi;src={{ src }};type={{ type }};cat={{ cat }};qty={{ qty }};cost={{ cost }};dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord={{ ord }}{{ customVariables }}?">'); | ||
@@ -47,4 +47,14 @@ /** | ||
Floodlight.prototype.track = function(track) { | ||
// Returns array of objects | ||
var mappedEvents = this.events(track.event()); | ||
var mappedEvents = []; | ||
if (!this.options.events || !this.options.events.length) return; | ||
// retrieve event mappings that match the current event | ||
for (var i=0; i<this.options.events.length; i++) { | ||
var item = this.options.events[i]; | ||
if (item.value) { | ||
if (toNoCase(item.key) === toNoCase(track.event())) mappedEvents.push(item.value); | ||
} else if (toNoCase(item.event) === toNoCase(track.event())) { | ||
mappedEvents.push(item); | ||
} | ||
} | ||
var settings = this.options; | ||
@@ -51,0 +61,0 @@ |
{ | ||
"name": "@segment/analytics.js-integration-doubleclick-floodlight", | ||
"description": "The DoubleClick Floodlight analytics.js integration.", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"keywords": [ | ||
@@ -32,3 +32,4 @@ "analytics.js", | ||
"component-querystring": "^2.0.0", | ||
"obj-case": "^0.2.0" | ||
"obj-case": "^0.2.0", | ||
"to-no-case": "^0.1.3" | ||
}, | ||
@@ -35,0 +36,0 @@ "devDependencies": { |
@@ -117,4 +117,3 @@ 'use strict'; | ||
analytics.compare(Floodlight, integration('DoubleClick Floodlight') | ||
.option('source', '') | ||
.mapping('events')); | ||
.option('source', '')); | ||
}); | ||
@@ -121,0 +120,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
470632
9095
0
6
+ Addedto-no-case@^0.1.3