1.3.3 • Published 5 years ago

@selinarnd/selina-attribution v1.3.3

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

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

ParameterTypeOriginDescription/Example
visitDatestringGMT date/time of the entry to the website
campIdnumberGet from URL query string camp_idThis is the campaign identifier in the back office.Example: http://selina.com/?camp_id=123
utmSourcestringGet from URL query string utm_sourcehttp://selina.com/?utm_source=GoogleExamples: Google/Facebook/NomadicMatt
utmCampignstringGet from URL query string utm_campaign
utmContentstringGet from URL query string utm_content
utmTermstringGet from URL query string utm_term
gclidstringGet from URL query string gclid
fbclidstringGet from URL query string fbclid
gaIdstringGet from first party cookie created by google analyticsThe cookie name is _ga
userAgentstringTake from the http headerThe full as-is user agent string, where it exists
referrerstringTaken from the browser referrer
landingPagestringPage in which the visitor starts his session
campDatajsonTaken from the query string as is, if it’s a valid jsonE.g https://www.selina.com/?camp_data=%7B%22campaign%22%3A%22google%20black%20friday%22%2C%20%22affiliate_name%22%3A%22buba%22%7D

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

1.3.3

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.6-1

5 years ago

1.0.6

5 years ago

1.0.6-2

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago