@funnel10x/tracking 1.0.0 → 1.0.1
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 +6 -4
- package/dist/gtm.html +2 -2
- package/dist/index.js +6 -6
- package/dist/tag.js +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -64,14 +64,16 @@ init({
|
|
|
64
64
|
```json
|
|
65
65
|
{
|
|
66
66
|
"rewrites": [
|
|
67
|
-
{ "source": "/_t/static/:path
|
|
68
|
-
{ "source": "/_t/array/:path
|
|
69
|
-
{ "source": "/_t/:path
|
|
67
|
+
{ "source": "/_t/static/:path(.*)", "destination": "https://us-assets.i.posthog.com/static/:path" },
|
|
68
|
+
{ "source": "/_t/array/:path(.*)", "destination": "https://us-assets.i.posthog.com/array/:path" },
|
|
69
|
+
{ "source": "/_t/:path(.*)", "destination": "https://us.i.posthog.com/:path" }
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
O `
|
|
74
|
+
O padrão é `:path(.*)` e não `:path*`, que não apanha a barra final dos
|
|
75
|
+
envios (`/e/`) e lhes responde 404 (medido em produção). O `_` à frente
|
|
76
|
+
garante que não colide com um funil (a base não deixa um nome
|
|
75
77
|
de funil começar por `_`). **E o site leva `Referrer-Policy: strict-origin`**
|
|
76
78
|
(nos `headers` do `vercel.json`): o proxy é do mesmo domínio, e com a política
|
|
77
79
|
por omissão o browser manda-lhe o URL inteiro da página no `Referer`, com o
|
package/dist/gtm.html
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<!-- @funnel10x/tracking@1.0.
|
|
1
|
+
<!-- @funnel10x/tracking@1.0.1: a tag do GTM (Custom HTML, em All Pages). Só se muda a chave; uma versão nova é um ficheiro novo. -->
|
|
2
2
|
<script>
|
|
3
3
|
window.f10xTracking = {
|
|
4
4
|
key: '{{PostHog project key}}',
|
|
5
5
|
checkoutHosts: []
|
|
6
6
|
}
|
|
7
7
|
</script>
|
|
8
|
-
<script src="https://cdn.jsdelivr.net/npm/@funnel10x/tracking@1.0.
|
|
8
|
+
<script src="https://cdn.jsdelivr.net/npm/@funnel10x/tracking@1.0.1/dist/tag.js" integrity="sha384-TAV0wuwYZm3WbN/Lo9h2OzbAV0v6n3YnnyezN4+GuNeHWOaCDb+puCe0BRHE1rBx" crossorigin="anonymous"></script>
|