Skip to content

Conversation

sadjow
Copy link
Member

@sadjow sadjow commented Aug 27, 2025

Summary

Introduces runtime tracking control for dynamic enable/disable based on user consent (e.g., cookie banners).

Closes #28

Features

  • Runtime Control: Enable/disable tracking dynamically via useNuxtUTM() composable
  • Privacy Focused: Clear all data, persistent preferences, GDPR-friendly
  • Cookie Banner Ready: Perfect for consent management integration

Breaking Changes

useNuxtUTM() now returns an object instead of data array:

// Before
const utm = useNuxtUTM() // data array

// After  
const utm = useNuxtUTM()
const data = utm.data.value

API

const utm = useNuxtUTM()
// utm.data - collected UTM data
// utm.trackingEnabled - current state
// utm.enableTracking() 
// utm.disableTracking()
// utm.clearData()

Test Plan

  • 41 tests passing
  • Runtime control test suite
  • Interactive playground demo

@sadjow sadjow marked this pull request as ready for review August 29, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a option/method to disable tracking in case the website provides a way for the user to disable it.
1 participant