Configure Palace Tracker using data attributes.
Configure the tracker by adding data attributes to the script tag:
Unique identifier for your website. This is automatically generated when a new website is added.
data-website-id="abc123"
Controls automatic tracking. Set to "false" to disable auto-initialization. Default is true.
data-auto-track="false"
Optional tag to identify different implementations or environments.
data-tag="production"
<script defer src="https://cdn.palaceanalytics.com/palace-tracker.js" data-website-id="abc123" data-auto-track="true" data-tag="production" ></script>
Every event sent by Palace Tracker includes the following data:
{
"websiteId": "your-website-id",
"hostname": "example.com",
"language": "en-US",
"screenSize": "1920x1080",
"userAgent": "Mozilla/5.0...",
"url": "https://example.com/page",
"referrer": "https://google.com",
"tag": "production",
"eventType": "button_click",
"data": {
// Event-specific data goes here
"button": "signup",
"location": "hero"
}
}