referrer-catchup
v1.0.1
Published
[![NPM version](https://img.shields.io/npm/v/referrer-catchup.svg)](https://www.npmjs.com/package/referrer-catchup) [![Build Status](https://img.shields.io/travis/ryo-hisano/referrer-catchup.svg)](https://travis-ci.org/ryo-hisano/referrer-catchup) [![Depe
Downloads
10
Readme
ReferrerCatchUp
A JavaScript plug-in that appends GET parameters attached to the current page URL only to links that specify a specific URL destination. It is used to measure the effect at the time of transition from a certain advertisement to cart.
How to use
<script src="https://cdn.jsdelivr.net/gh/ryo-hisano/[email protected]/dist/ref.js" defer></script>
<script defer>
new ReferrerCatchUp({
allow_domains: ['google.co.jp'],
ignore_lists: ['utm_medium', 'utm_source', 'utm_campaign']
});
</script>
Extended function
| Options | Contents | Default value | Example |
| --------------- | ---------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------- |
| allow_domains
| Domain Allow List. Change only the href that has the specified domain as the link destination. | None | ['google.co.jp'] |
| ignore_lists
| Parameter ban list. Specify a parameter that you do not want to add to href. | ['*'](All) | ['utm_medium', 'utm_source', 'utm_campaign'] |