Skip to content

Commit

Permalink
add usage tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejch committed Aug 10, 2020
1 parent ee49a9b commit 4738031
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/cms-kontent/lib/api.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { DeliveryClient } from '@kentico/kontent-delivery'
import { name, version } from '../package.json'

const sourceTrackingHeaderName = 'X-KC-SOURCE'

const client = new DeliveryClient({
projectId: process.env.KONTENT_PROJECT_ID,
previewApiKey: process.env.KONTENT_PREVIEW_API_KEY,
globalHeaders: (_queryConfig) => [
{
header: sourceTrackingHeaderName,
value: `@vercel/next.js/example/${name};${version}`,
},
],
})

function parseAuthor(author) {
Expand Down

0 comments on commit 4738031

Please sign in to comment.