@reuters-graphics/graphics-components 3.0.17 → 3.0.18
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
onMount(() => {
|
|
8
8
|
window.graphicsAdQueue = window.graphicsAdQueue || [];
|
|
9
9
|
loadScript(
|
|
10
|
-
'https://
|
|
10
|
+
'https://www.reuters.com/static/js/bootstrap/v1.1.2/bootstrap.static.js',
|
|
11
11
|
{ onload: loadBootstrap, async: false }
|
|
12
12
|
);
|
|
13
13
|
// Load Freestar script
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
<!-- @component `Analytics` [Read the docs.](https://reuters-graphics.github.io/graphics-components/?path=/docs/components-ads-analytics-analytics--docs) -->
|
|
2
|
-
|
|
3
2
|
<script module>
|
|
4
|
-
// GTM configuration
|
|
5
|
-
const GTM_ID = 'GTM-P9TTSWG2';
|
|
6
|
-
const GTM_SCRIPT = `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${GTM_ID}');`;
|
|
7
|
-
|
|
8
3
|
import { registerPageview as registerChartbeatPageview } from './providers/chartbeat';
|
|
9
4
|
import { registerPageview as registerGAPageview } from './providers/ga';
|
|
10
5
|
|
|
@@ -24,6 +19,8 @@
|
|
|
24
19
|
|
|
25
20
|
import { onMount } from 'svelte';
|
|
26
21
|
import { ga, chartbeat } from './providers';
|
|
22
|
+
import GoogleTagManager from './GTM.svelte';
|
|
23
|
+
|
|
27
24
|
interface Props {
|
|
28
25
|
/**
|
|
29
26
|
* Used to associate a page with its author(s) in Chartbeat.
|
|
@@ -39,20 +36,4 @@
|
|
|
39
36
|
});
|
|
40
37
|
</script>
|
|
41
38
|
|
|
42
|
-
<
|
|
43
|
-
<!-- Google Tag Manager -->
|
|
44
|
-
{@html `<${'script'}>${GTM_SCRIPT}</script>`}
|
|
45
|
-
<!-- End Google Tag Manager -->
|
|
46
|
-
</svelte:head>
|
|
47
|
-
|
|
48
|
-
<!-- Google Tag Manager (noscript) -->
|
|
49
|
-
<noscript>
|
|
50
|
-
<iframe
|
|
51
|
-
src="https://www.googletagmanager.com/ns.html?id={GTM_ID}"
|
|
52
|
-
height="0"
|
|
53
|
-
width="0"
|
|
54
|
-
style="display:none;visibility:hidden"
|
|
55
|
-
title=""
|
|
56
|
-
></iframe>
|
|
57
|
-
</noscript>
|
|
58
|
-
<!-- End Google Tag Manager (noscript) -->
|
|
39
|
+
<GoogleTagManager />
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
const GTM_ID = 'GTM-P9TTSWG2';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<svelte:head>
|
|
6
|
+
<!-- Google Tag Manager -->
|
|
7
|
+
<link href="https://www.googletagmanager.com" rel="preconnect" />
|
|
8
|
+
<script>
|
|
9
|
+
window.dataLayer = window.dataLayer || [];
|
|
10
|
+
window.dataLayer.push({
|
|
11
|
+
'gtm.start': new Date().getTime(),
|
|
12
|
+
event: 'gtm.js',
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
<script async src={`https://www.googletagmanager.com/gtm.js?id=${GTM_ID}`}>
|
|
16
|
+
</script>
|
|
17
|
+
<!-- End Google Tag Manager -->
|
|
18
|
+
</svelte:head>
|
|
19
|
+
|
|
20
|
+
<!-- Google Tag Manager (noscript) -->
|
|
21
|
+
<noscript>
|
|
22
|
+
<iframe
|
|
23
|
+
src={`https://www.googletagmanager.com/ns.html?id=${GTM_ID}`}
|
|
24
|
+
height="0"
|
|
25
|
+
width="0"
|
|
26
|
+
style="display:none;visibility:hidden"
|
|
27
|
+
title=""
|
|
28
|
+
></iframe>
|
|
29
|
+
</noscript>
|
|
30
|
+
<!-- End Google Tag Manager (noscript) -->
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Gtm: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type Gtm = InstanceType<typeof Gtm>;
|
|
18
|
+
export default Gtm;
|