Skip to content

feat: add runtime tracking control with privacy features#54

Merged
sadjow merged 3 commits into
mainfrom
feat/module-enable-disable
Sep 24, 2025
Merged

feat: add runtime tracking control with privacy features#54
sadjow merged 3 commits into
mainfrom
feat/module-enable-disable

Conversation

@sadjow

@sadjow sadjow commented Aug 27, 2025

Copy link
Copy Markdown
Member

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

@hakenprog hakenprog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sadjow
sadjow merged commit 9ba7bd0 into main Sep 24, 2025
2 checks passed
@sadjow
sadjow deleted the feat/module-enable-disable branch September 24, 2025 16:31
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.

2 participants