Pass.js tracks referral traffic. It helps analyze conversion funnels by capturing URL parameters through hidden form fields. It’s very small and easy to install.

The Challenge

While at Fathom, clients often asked how many leads could be attributed to their PPC campagin. These values needed to be tracked to better understand where leads were coming from.

The Outcome

A reusable javascript library that accurately tracks leads. Weighing only 3 kilobytes, Pass.js can be used with little overhead.

Brainstorming and Prototyping


How Pass.js Works

1. Someone visits the website.

A person visits the page through a link. Appended to the link are url parameters, which look something like this ?utm_source=google. These parameters need to be recorded if a the visitor completes the web to lead form.

2. The parameters are saved as cookies.

As soon as the webpage loads, the parameters are saved as cookies. Cookies allow Pass.js to be more accurate. Wondering why they are saved as cookies? Find out.

3. The cookie values are sent to hidden form fields.

The cookies are injected into hidden form fields. When this form is submitted, we know exactly where the lead came from. Knowing the source of the lead determine marketing spend.

4. Conversion data is successfully captured.

Once a visitor submits the form we know what campaign segement the lead can be attributed to. This information is vital in making future spending decisions. With this data we can separate the wheat from the chaff.

Why save the params as cookies?

Without cookies, if a user were to revisit the site, the campaign would recieve no attribution. Cookies were used to keep the results intact. Each and every value was stored as a cookie with a default expiration of 30 days.

The motivation to write Pass.js came from the need to analyze refferal traffic for PPC campaigns.

View Site