@dub/analytics
Advanced tools
@@ -8,6 +8,6 @@ interface AnalyticsProps { | ||
/** | ||
* The publishable API key to use for tracking click events. | ||
* @example 'dub_publishable_xxxxxxxxxx' | ||
* The domain of the short link to track clicks for. This is required for client-side click-tracking. | ||
* @example 'example.com' | ||
*/ | ||
apiKey?: string; | ||
domain?: string; | ||
/** | ||
@@ -14,0 +14,0 @@ * The Attribution Model to use for the analytics event. |
// package.json | ||
var name = "@dub/analytics"; | ||
var version = "0.0.21"; | ||
var version = "0.0.22"; | ||
@@ -26,4 +26,4 @@ // src/utils.tsx | ||
} | ||
if (props.apiKey) { | ||
script.setAttribute("data-api-key", props.apiKey); | ||
if (props.domain) { | ||
script.setAttribute("data-domain", props.domain); | ||
} | ||
@@ -30,0 +30,0 @@ if (props.attributionModel) { |
@@ -8,6 +8,6 @@ interface AnalyticsProps { | ||
/** | ||
* The publishable API key to use for tracking click events. | ||
* @example 'dub_publishable_xxxxxxxxxx' | ||
* The domain of the short link to track clicks for. This is required for client-side click-tracking. | ||
* @example 'example.com' | ||
*/ | ||
apiKey?: string; | ||
domain?: string; | ||
/** | ||
@@ -14,0 +14,0 @@ * The Attribution Model to use for the analytics event. |
@@ -8,3 +8,3 @@ "use client"; | ||
var name = "@dub/analytics"; | ||
var version = "0.0.21"; | ||
var version = "0.0.22"; | ||
@@ -32,4 +32,4 @@ // src/utils.tsx | ||
} | ||
if (props.apiKey) { | ||
script.setAttribute("data-api-key", props.apiKey); | ||
if (props.domain) { | ||
script.setAttribute("data-domain", props.domain); | ||
} | ||
@@ -36,0 +36,0 @@ if (props.attributionModel) { |
{ | ||
"name": "@dub/analytics", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -43,5 +43,5 @@ ## Overview | ||
### `apiKey` | ||
### `domain` | ||
The publishable API key to use for client-side click tracking. Get your publishable API key from your [Dub workspace's token settings page](https://app.dub.co/settings/tokens). | ||
The domain of the short link to track clicks for. This is required for client-side click-tracking. | ||
@@ -48,0 +48,0 @@ ### `attributionModel` |
@@ -26,4 +26,4 @@ import { name, version } from '../package.json'; | ||
if (props.apiKey) { | ||
script.setAttribute('data-api-key', props.apiKey); | ||
if (props.domain) { | ||
script.setAttribute('data-domain', props.domain); | ||
} | ||
@@ -30,0 +30,0 @@ |
@@ -11,6 +11,6 @@ export type AllowedPropertyValues = string | number | boolean | null; | ||
/** | ||
* The publishable API key to use for tracking click events. | ||
* @example 'dub_publishable_xxxxxxxxxx' | ||
* The domain of the short link to track clicks for. This is required for client-side click-tracking. | ||
* @example 'example.com' | ||
*/ | ||
apiKey?: string; | ||
domain?: string; | ||
@@ -17,0 +17,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65413
0.05%