@selinarnd/selina-attribution
Module to accept traffic with marketing identifiers and keep them for later use
Last updated 4 months ago by doronl .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @selinarnd/selina-attribution 
SYNC missed versions from official npm registry.

Selina Attribution Module

The goal is to be able to know the history of all the user visits once he makes a booking or other significant events. The module would be responsible to capture and calculate marketing parameters and identifiers for every user session in an array / local storage (each session is added to the array).

Parameters

Parameter Type Origin Description/Example
visitDate string GMT date/time of the entry to the website
campId number Get from URL query string camp_id This is the campaign identifier in the back office.Example: http://selina.com/?camp_id=123
utmSource string Get from URL query string utm_source http://selina.com/?utm_source=GoogleExamples: Google/Facebook/NomadicMatt
utmCampign string Get from URL query string utm_campaign
utmContent string Get from URL query string utm_content
utmTerm string Get from URL query string utm_term
gclid string Get from URL query string gclid
fbclid string Get from URL query string fbclid
gaId string Get from first party cookie created by google analytics The cookie name is _ga
userAgent string Take from the http header The full as-is user agent string, where it exists
referrer string Taken from the browser referrer
landingPage string Page in which the visitor starts his session
campData json Taken from the query string as is, if it’s a valid json E.g https://www.selina.com/?camp_data={"campaign"%3A"google black friday"%2C "affiliate_name"%3A"buba"}

Extra parameters

The module will add in the response any value data in: window._selinaAttributionConfig.extraParams = {...}

Storage

The module will try to use 'localStorage' ('sessionStorage' if it isn't available), it can be overrided with any compatible method in: window._selinaAttributionConfig.storage

Methods

SelinaAttribution module expose these methods to the console:

getAllTouchpoints

Return the object with an array of all the user touchpoints formated.

getCurrentTouchpoint

Return the current visit list of parameters formated.

Development

Build

npm i
npm run build

Test

npm i
npm run test

Git

Commit

This project use the conventional change log and the angular commit format to automatically generate the changelog file, to help the developers to follow the convetion we use commitizen throught the command:

npm run commit

if you are contributing this project please use this instead of git commit

Auto fix linter errors:

Before each commit a pre hook check with eslinter the changed files in the commit, if you get an linter error you can try to autofixed with:

npm run fixlint

Contributing

Before contribute please check our contributing guidelines

Current Tags

  • 1.1.6                                ...           latest (4 months ago)

16 Versions

  • 1.1.6                                ...           4 months ago
  • 1.1.5                                ...           4 months ago
  • 1.1.4                                ...           5 months ago
  • 1.1.3                                ...           5 months ago
  • 1.1.2                                ...           5 months ago
  • 1.1.1                                ...           5 months ago
  • 1.1.0                                ...           5 months ago
  • 1.0.6-2                                ...           5 months ago
  • 1.0.6-1                                ...           5 months ago
  • 1.0.6                                ...           5 months ago
  • 1.0.5                                ...           6 months ago
  • 1.0.4                                ...           6 months ago
  • 1.0.3                                ...           6 months ago
  • 1.0.2                                ...           6 months ago
  • 1.0.1                                ...           6 months ago
  • 1.0.0                                ...           8 months ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |