Collect Analytics from your Website

Measure activity on your website better than ever before by collecting website pageviews and other Events with Firstparty.


You'll see the most accurate representation of visitor activity available, made possible since every Event travels through a domain that matches your website's. Every request and cookie is truly first-party, and your reports may show more pageviews, sessions, and visitors than are reported in your existing analytics solutions.

Step 1: Point a Subdomain to Firstparty

Setup a DNS record pointing a subdomain of your website to Firstparty.

  1. Select Domains from the navigation menu
  2. Click "Add Domain"
  3. Enter the root Domain you'd like to connect (if your website is www.widgetparty.com, enter widgetparty.com), then click "Save Domain"
  4. Follow the instructions on the Setup tab to add a CNAME record to your DNS provider

After you add the CNAME record to your DNS provider, click "Verify" at the bottom of the Domain Setup screen to confirm your Domain is properly pointed at Firstparty.

  1. Select Domains from the navigation menu
  2. Click "Add Domain"
  3. Enter the root Domain you'd like to connect (if your website is www.widgetparty.com, enter widgetparty.com), then click "Save Domain"
  4. Follow the instructions on the Setup tab to add a CNAME record to your DNS provider

After you add the CNAME record to your DNS provider, click "Verify" at the bottom of the Domain Setup screen to confirm your Domain is properly pointed at Firstparty.

Step 2: Create a Javascript Source

Setup a new Javascript Source and then install Firstparty.js on your website.

  1. Click on Sources in the navigation sidebar
  2. Click the "Add Source" button
  3. Select "Javascript" as the Source to configure
  4. Provide a name for the Source, then click "Create Source"
  5. Follow the instructions on the Setup tab to install the Firstparty snippet on your website

Your snippet will look similar to this snippet below, but this is just an example. Please make sure to use the Javascript specified by your Source

<script>
    !function(){var t=window.firstparty=window.firstparty||[];if(!t.initialize){if(t.invoked)return void(window.console&&console.error&&console.error("Firstparty snippet included twice."));t.invoked=!0,t.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],t.factory=function(r){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(r),t.push(e),t}};for(var r=0;r<t.methods.length;r++){var e=t.methods[r];t[e]=t.factory(e)}t.load=function(r,e,i){t._writeKey=r,t._host=e,t._firstpartyOptions=i;var a="/js/firstparty.min.js";void 0!==i&&void 0!==i.libraryPath&&(a=i.libraryPath);var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src="https://"+e+a;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(o,n)},t.SNIPPET_VERSION="0.1.0"}}();
    firstparty.load("12345678901234567890", "fp.yourwebsite.com");
    firstparty.page();
</script>

After you install the snippet on your website, refresh your website in your browser and click "Verify" at the bottom of the Source Setup screen to confirm your Source is properly sending Events to Firstparty.

  1. Click on Sources in the navigation sidebar
  2. Click the "Add Source" button
  3. Select "Javascript" as the Source to configure
  4. Provide a name for the Source, then click "Create Source"
  5. Follow the instructions on the Setup tab to install the Firstparty snippet on your website

Your snippet will look similar to this snippet below, but this is just an example. Please make sure to use the Javascript specified by your Source

<script>
    !function(){var t=window.firstparty=window.firstparty||[];if(!t.initialize){if(t.invoked)return void(window.console&&console.error&&console.error("Firstparty snippet included twice."));t.invoked=!0,t.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],t.factory=function(r){return function(){var e=Array.prototype.slice.call(arguments);return e.unshift(r),t.push(e),t}};for(var r=0;r<t.methods.length;r++){var e=t.methods[r];t[e]=t.factory(e)}t.load=function(r,e,i){t._writeKey=r,t._host=e,t._firstpartyOptions=i;var a="/js/firstparty.min.js";void 0!==i&&void 0!==i.libraryPath&&(a=i.libraryPath);var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src="https://"+e+a;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(o,n)},t.SNIPPET_VERSION="0.1.0"}}();
    firstparty.load("12345678901234567890", "fp.yourwebsite.com");
    firstparty.page();
</script>

After you install the snippet on your website, refresh your website in your browser and click "Verify" at the bottom of the Source Setup screen to confirm your Source is properly sending Events to Firstparty.

View Reports, Configure Destinations, and More

Congratulations on installing Firstparty! After you begin collecting Page Viewed Events from your website, you may do all sorts of things with Firstparty.