File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -138,4 +138,30 @@ analytics.page();
138138```
139139{% endcodeexampletab %}
140140
141- {% endcodeexample %}
141+ {% codeexampletab HTML head with snippet %}
142+ ``` html
143+ <head >
144+ <title >My Page Title</title >
145+ <link rel =" canonical" href =" https://example.com/page" />
146+
147+ <!-- Segment snippet -->
148+ <script type =" text/javascript" >
149+ (function () {
150+ var analytics = window .analytics = window .analytics || [];
151+ analytics ._writeKey = " YOUR_WRITE_KEY" ;
152+ analytics .SNIPPET_VERSION = " 5.x" ;
153+ analytics .load = function (key ) {
154+ var s = document .createElement (" script" );
155+ s .async = true ;
156+ s .src = " https://cdn.segment.com/analytics.js/v1/" + key + " /analytics.min.js" ;
157+ document .head .appendChild (s);
158+ };
159+ analytics .load (" YOUR_WRITE_KEY" );
160+ analytics .page ();
161+ })();
162+ </script >
163+ </head >
164+ ```
165+ {% endcodeexampletab %}
166+
167+ {% endcodeexample %}
You can’t perform that action at this time.
0 commit comments