@pageviews/tracker 0.2.3 → 0.2.4

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.
package/README.md CHANGED
@@ -138,8 +138,4 @@ Stops all tracking and resets state. Useful for SPA cleanup or testing. `init()`
138
138
 
139
139
  For configuration options, advanced usage, and the script tag installation method, see the full docs:
140
140
 
141
- **[pageviews.ai/docs/npm-module-at-pageviewstracker](https://pageviews.ai/docs/npm-module-at-pageviewstracker)**
142
-
143
- ## License
144
-
145
- MIT
141
+ **[pageviews.ai/docs/npm-module-at-pageviewstracker](https://pageviews.ai/docs/npm-module-at-pageviewstracker)**
@@ -505,7 +505,7 @@ async function init(options) {
505
505
  throw new Error('pageviews.init() can only be called once');
506
506
  initialized = true;
507
507
  const ingestEndpoint = (options.endpoint || 'https://data.pageviews.ai') + '/api/event';
508
- const cfgEndpoint = options.configEndpoint || 'https://app.pageviews.ai';
508
+ const cfgEndpoint = options.configEndpoint || 'https://pageviews.ai';
509
509
  const cached = getCachedConfig(options.siteId);
510
510
  if (cached) {
511
511
  startTracking(Object.assign(Object.assign({}, cached), { siteId: options.siteId, endpoint: ingestEndpoint }));
@@ -34,7 +34,7 @@ interface InitOptions {
34
34
  siteId: string;
35
35
  /** Ingest service base URL for sending events. Default: https://data.pageviews.ai */
36
36
  endpoint?: string;
37
- /** Laravel app base URL for fetching site config. Default: https://app.pageviews.ai */
37
+ /** Laravel app base URL for fetching site config. Default: https://pageviews.ai */
38
38
  configEndpoint?: string;
39
39
  }
40
40
  declare function init(options: InitOptions): Promise<void>;
@@ -503,7 +503,7 @@ async function init(options) {
503
503
  throw new Error('pageviews.init() can only be called once');
504
504
  initialized = true;
505
505
  const ingestEndpoint = (options.endpoint || 'https://data.pageviews.ai') + '/api/event';
506
- const cfgEndpoint = options.configEndpoint || 'https://app.pageviews.ai';
506
+ const cfgEndpoint = options.configEndpoint || 'https://pageviews.ai';
507
507
  const cached = getCachedConfig(options.siteId);
508
508
  if (cached) {
509
509
  startTracking(Object.assign(Object.assign({}, cached), { siteId: options.siteId, endpoint: ingestEndpoint }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pageviews/tracker",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Lightweight, cookie-free analytics tracker for PageViews.ai",
5
5
  "author": "Pageviews <hello@pageviews.ai>",
6
6
  "homepage": "https://pageviews.ai",