fix: inject Rybbit tracking on m.tkmind.cn publication pages
Memind CI / Test, build, and release guards (push) Successful in 1m36s
Memind CI / Test, build, and release guards (push) Successful in 1m36s
Publication routes and share shells were missing the Rybbit tracker, and bootstrap now reuses the stored MindSpace analytics secret when Rybbit env secret is absent. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -26,6 +26,17 @@ test('rybbit config is disabled unless explicitly enabled and configured', () =>
|
||||
assert.equal(config.scriptPath, '/rybbit/script.js');
|
||||
});
|
||||
|
||||
test('rybbit config can reuse stored analytics secret', () => {
|
||||
const config = resolveMindSpaceRybbitConfig({
|
||||
MEMIND_RYBBIT_ENABLED: 'true',
|
||||
MEMIND_RYBBIT_SITE_ID: '2',
|
||||
}, {
|
||||
idSecret: 'stored-secret',
|
||||
});
|
||||
assert.equal(config.enabled, true);
|
||||
assert.equal(config.idSecret, 'stored-secret');
|
||||
});
|
||||
|
||||
test('injects one local same-origin rybbit tracker with page dimensions', () => {
|
||||
const html = '<!doctype html><html><head><title>Demo</title></head><body><h1>Demo</h1></body></html>';
|
||||
const out = injectMindSpaceRybbit(html, {
|
||||
|
||||
Reference in New Issue
Block a user