docs: simplify GTM integration guide for auto-detect domain
This commit is contained in:
@@ -2298,31 +2298,30 @@ export default defineConfig({
|
|||||||
<p>Follow these steps to add Pulse through GTM:</p>
|
<p>Follow these steps to add Pulse through GTM:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>Go to <strong>Tags → New → Custom HTML</strong></li>
|
<li>Go to <strong>Tags → New → Custom HTML</strong></li>
|
||||||
<li>Paste the snippet below (replace <code>your-site.com</code> with your domain)</li>
|
<li>Paste the snippet below</li>
|
||||||
<li>Set the trigger to <strong>All Pages</strong></li>
|
<li>Set the trigger to <strong>All Pages</strong></li>
|
||||||
<li>Publish your container</li>
|
<li>Publish your container</li>
|
||||||
</ol>
|
</ol>
|
||||||
<CodeBlock filename="GTM → Custom HTML Tag (recommended)">{`<script>
|
<CodeBlock filename="GTM → Custom HTML Tag">{`<script defer src="https://pulse.ciphera.net/script.js"></script>`}</CodeBlock>
|
||||||
window.pulseConfig = { domain: "your-site.com" };
|
|
||||||
</script>
|
|
||||||
<script defer src="https://pulse.ciphera.net/script.js"></script>`}</CodeBlock>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This uses a global config object so that GTM does not need to preserve{' '}
|
That's it. Pulse auto-detects the domain from the page, so no extra
|
||||||
<code>data-*</code> attributes on the injected script element. You can
|
configuration is needed.
|
||||||
also pass <code>api</code>, <code>storage</code>, and other options via{' '}
|
|
||||||
<code>pulseConfig</code>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary className="cursor-pointer text-sm text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300">
|
<summary className="cursor-pointer text-sm text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300">
|
||||||
Alternative: inline data attributes (may not work in all GTM setups)
|
Advanced: override domain or configure options
|
||||||
</summary>
|
</summary>
|
||||||
<CodeBlock filename="GTM → Custom HTML Tag (alternative)">{`<script
|
<p className="mt-3 text-sm text-neutral-600 dark:text-neutral-400">
|
||||||
defer
|
If your site is registered under a different domain than the page
|
||||||
data-domain="your-site.com"
|
hostname, or you need custom options (API endpoint, storage mode, etc.),
|
||||||
src="https://pulse.ciphera.net/script.js"
|
use <code>pulseConfig</code>:
|
||||||
></script>`}</CodeBlock>
|
</p>
|
||||||
|
<CodeBlock filename="GTM → Custom HTML Tag (with config)">{`<script>
|
||||||
|
window.pulseConfig = { domain: "your-site.com" };
|
||||||
|
</script>
|
||||||
|
<script defer src="https://pulse.ciphera.net/script.js"></script>`}</CodeBlock>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user