analytics-plugin-original-source
v0.2.6
Published
Save original referral source of visitor plugin for 'analytics' pkg
Downloads
1,926
Maintainers
Readme
Analytics Original Source Plugin
Notice: Package has moved to @analytics/original-source-plugin
Track the initial traffic source of visitors to your site
This plugin will save the original __user_original_source
& __user_original_landing_page
to localStorage and on the user properties.
Example:
__user_original_source = "source=(direct)|medium=(none)|campaign=(not set)"
__user_original_landing_page = "https://www.site.com/landing-page"
This data is handy when assigning attribution metrics.
Usage
npm install analytics
npm install @analytics/original-source-plugin
import Analytics from 'analytics'
import originalSourcePlugin from '@analytics/original-source-plugin'
const analytics = Analytics({
app: 'my-app',
version: 100,
debug: true,
plugins: [
originalSourcePlugin(),
]
})