Integration QA Steps: Website

Steps to check that your website integration is working as expected.

Configure QA/staging sites in Chartbeat

If you are adding new Chartbeat code to a website, we recommend first adding our code in a controlled QA/staging environment. The recommended way to handle this is to have the domain value in your Chartbeat tag set to your staging site ID (e.g. staging.mysite.com) when running on staging, and your production site ID (e.g. mysite.com) when in production.

So the production code line would be:

_sf_async_config.domain = "mysite.com";

And the staging code would be:

_sf_async_config.domain = "staging.mysite.com";

This way, traffic data from your integration QA tests will stay confined in a separate test site in Chartbeat.

Note: The test Site will have to be added to your organization's Chartbeat account to test your data in this sandbox dashboard. If you run into any issues adding this sandbox site to your account, contact support@chartbeat.com and we'll get it added for you.

Check your Real-Time Dashboard

Our Real-Time dashboard lets you see current activity on your site. If this view shows data after adding our tag to your site and loading your webpage in a browser, then your snippet is collecting data and sending it to Chartbeat as expected. This dashboard displays activity for specific pages, so if you haven’t added the snippet to all pages on your site, you can check check to see whether the snippet is sending data from the pages you have tagged.

To check out your Real-Time dashboard:

  1. Sign in to your Chartbeat account.

  2. From the Sites page, find the site you've recently implemented, hover over the site entry to reveal the 'Real-Time' button, and select it.

Tip: If you do not have a Chartbeat user account, request access from one of your account admins.

Here are some useful QA steps to ensure proper tracking:

Top Pages

  • Page titles are populating as expected

  • Hover over page titles in this list to view the canonical paths received from these pages. Alternatively, click into the article view and right-click the title to copy the link address

  • Check for duplicate page entries in this list, and identify the discrepant paths being received from these pages to determine the fix in your configuration settings

Other Real-Time QA Checks

  • Open the section & author drop-down filters to ensure section & author data is populating as expected

  • Check the Device module in the left-hand column to ensure data is tracking for visitors viewing your site across unique device types

Use DevTools to monitor pings

You can use your browser's site inspector tools to monitor network activity from your site, filtering on "chartbeat" to view all chartbeat related scripts loading on the page, or on "ping?" to find requests to URLs beginning with ping.chartbeat.net.

Upon loading a page of your site, you should be able to view the requests here for chartbeat_mab.js (if you've included our headline testing code), chartbeat.js (or chartbeat_video.js), and the subsequent pings to our servers every 15 seconds, carrying most of the data we collect from your site.

Clicking into one of these ping requests to ping.chartbeat.net in DevTools will display a list of the included query string parameters in this call which contain data determined by the configuration variables in your code snippet. Below is a ping key that describes some of these query string fields that are important to check for in your review.

QSP/Key

Description

h

The site id, or "host" where your site's traffic data will appear in your Chartbeat account. This string is pulled from the value assigned to theconfig.domain variable in our snippet.

p

The page's path. This string should match your pages' canonical URL paths if your snippet sets config.useCanonical = true, or it should match the value assigned to config.path if your site makes use of our custom path variable. Sometimes this value is just the path portion of the URL, and sometimes it includes your domain name as well.

d

With this key, we collect the actual domain of your page, which may be different from the h-key host/site name in your Chartbeat account. If config.useCanonicalDomain is set to true in your Chartbeat code, this key should carry the domain set in your canonical URL. If that variable is not set to true, we will access the domain from document.location.

g

Account ID, pulled from the value assigned to config.uid in our snippet.

g0

A comma-delimited list of sections received from the page via the config.sections variable in our snippet.

g1

A comma-delimited list of authors received from the page via the config.authors variable in our snippet.

i

Page title. Only appears in the very first ping from each unique page session on your site.

r

Will carry the referring URL of the current pageview IF the referring page is an external site.

v

Will carry the referring URL of the current pageview IF the referring page is your own site.

t

Unique identifier for the page-session. Each unique t-key value represents a separate pageview in your Chartbeat data.

Next steps

Your website integration is now complete! 🎉

One final request before you jump to your next integration guide (see Google AMP, Mobile App SDKs, Headline and Image Testing, or Video Tracking next)...

We're starting to automatically collect even more metadata about your webpage content to power our next generation products. Review the final page of this guide to get a head start on what's next for Chartbeat.