@gurulu/cli 0.3.2 → 0.3.3
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/package.json
CHANGED
|
@@ -88,7 +88,7 @@ function buildInjection(opts) {
|
|
|
88
88
|
const siteId = opts.siteId || '';
|
|
89
89
|
const tenantId = opts.tenantId || '';
|
|
90
90
|
const publishableKey = opts.publishableKey || '';
|
|
91
|
-
const src = opts.scriptSrc || '
|
|
91
|
+
const src = opts.scriptSrc || 'https://gurulu.io/t.js';
|
|
92
92
|
return { siteId, tenantId, publishableKey, scriptSrc: src };
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -61,6 +61,8 @@ function ensureScriptImport(source) {
|
|
|
61
61
|
|
|
62
62
|
function injectScriptTag(source, injection) {
|
|
63
63
|
if (source.includes(MARKER)) return source; // idempotent
|
|
64
|
+
// Also detect existing tracker tags (manual or from other install methods)
|
|
65
|
+
if (source.includes('data-site-id=') || source.includes('data-gurulu-site-id=') || source.includes('/t.js')) return source;
|
|
64
66
|
const tag = buildScriptTag(injection);
|
|
65
67
|
// Prefer to insert just before </body>. Fall back to before the closing
|
|
66
68
|
// top-level fragment/element.
|