purplemeercat 发布于2年前 阅读1977次
0 条评论




The library stores data such as utm_medium , landing_page and referrer in a localStorage object, and makes the object available via a handy API with the following methods:

Purser.create() // automatically called on first website visit
Purser.fetch() // returns the object
Purser.convert(obj) // returns the object updated with conversion data
Purser.update(obj) // lets you add additional parameters to the object
Purser.destroy // removes the object from localStorage

View a live example at http://purser.herokuapp.com/ .


git clone https://github.com/bilbof/purser
  1. Add purser.js to every page on your website. When a visitor creates an account, call purser.convert(obj) and add the user to your CRM/ChartMogul with attributes returned.
  2. When a visitor creates an account, call purser.convert(obj) to get the visitor's marketing attributes
  3. Add the user's marketing attributes to them in your CRM or app


See an example at http://github.com/bilbof/purser/example .

查看原文: Purser.js: A lightweight library for linking utm codes to customers

需要 登录 后回复方可回复, 如果你还没有账号你可以 注册 一个帐号。