Tech DocsIntegrationMetadata
Importing Post Metadata

Importing Post Metadata

When importing raw logs, needs to be able to join this data to post metadata. Normally, we would crawl a customer's site to find this, but this is sometimes either difficult or impossible due to URLs changing or breaking over time. is able to import metadata to help with the overall data import process.

Each line in this file should represent a post for which there is pageview data in the pageview data file. URLs in this file should match URLs in the pageview data file. We do basic URL cleaning, like removing campaign querystring arguments, so we don't need every singe URL contained in the pageview logs. Instead, we need to match the cleaned URL in the pageview file to a URL, using the canonical_url or urls field, in this file.

For example:

would be cleaned to:

This is beacuse the utm_medium querysting arugment isn't used to identify the post. In this case, the argument is used for campaign tracking and therefore irrelevant to matching pageviews to metadata.

However, if your site uses querystring arguments to identify the post, we would not remove that argument as part of our cleaning. For example:

would be cleaned to:

Please note, this only applies to post pages. Section pages, front pages, and other non-post pages do not need to be included in this dataset.


The following is an example of an article which was published on the blog. Due to the complex nature of this data format, we use Newline Delimited JSON instead of CSV.

	"apikey": "",
	"authors": ["Andrew Montalenti",  "Matthew Carrigan"],
	"canonical_url": "",
	"full_content": "Machine learning for news: ... ",
	"image_url": "",
	"post_id": "",
	"pub_date": 1537797645000,
	"section": " Tech",
	"tags": ["currents", "machine learning", "natural language processing", " tech"],
	"title": "Machine learning for news: the NLP engine behind Currents",
	"urls": [

(Note: the line breaks above are for readability. The data import file should have one JSON object per line)


#apikey [required]

A string representing the name of the Site ID (apikey) for which the event should be counted. This value will be provided by for each site tracked.


A list of one or more authors for the article.

#canonical_url [required]

The main URL to use for this post. Since a post can have multiple URLs that point to it, we need to have a single URL which identifies the post.


The full text of the post.


URL pointing to the main image for this post.


String that uniquely identifies this post. This defaults to canonical_url and should only be specified if your site's integration is providing a post_id different from that default. The value for post_id here should match what we scrape from your website.


Publish date of the post, in seconds since the epoch.


The section the post was published under.


A list of any tags associted with the post.

#title [required]

The title of the post.


A list of URLs which share the same canonical_url. These may be additional pages to the post, different domains the post was published under, mobile versions of the post, etc.

Ready to get started with



rocket emoji