@pageviews/tracker 0.2.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,14 @@ function sendBeaconEvent(endpoint, payload, siteId) {
36
36
 
37
37
  // src/core/utils.ts
38
38
  const ALLOWED_QUERY_PARAMS = new Set([
39
+ // Attribution
39
40
  'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'ref',
41
+ // Pagination
42
+ 'page', 'p', 'offset', 'limit', 'per_page',
43
+ // Sorting & filtering
44
+ 'sort', 'order', 'orderby', 'order_by', 'filter', 'category', 'cat', 'tag', 'type',
45
+ // Content identifiers
46
+ 'id', 'v', 'tab', 'view', 'lang', 'locale', 'hl',
40
47
  ]);
41
48
  function sanitizeUrl(url) {
42
49
  try {
@@ -34,7 +34,14 @@ function sendBeaconEvent(endpoint, payload, siteId) {
34
34
 
35
35
  // src/core/utils.ts
36
36
  const ALLOWED_QUERY_PARAMS = new Set([
37
+ // Attribution
37
38
  'utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'ref',
39
+ // Pagination
40
+ 'page', 'p', 'offset', 'limit', 'per_page',
41
+ // Sorting & filtering
42
+ 'sort', 'order', 'orderby', 'order_by', 'filter', 'category', 'cat', 'tag', 'type',
43
+ // Content identifiers
44
+ 'id', 'v', 'tab', 'view', 'lang', 'locale', 'hl',
38
45
  ]);
39
46
  function sanitizeUrl(url) {
40
47
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageviews/tracker",
3
- "version": "0.2.4",
3
+ "version": "0.4.0",
4
4
  "description": "Lightweight, cookie-free analytics tracker for PageViews.ai",
5
5
  "author": "Pageviews <hello@pageviews.ai>",
6
6
  "homepage": "https://pageviews.ai",