-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstatic_test.html
61 lines (57 loc) · 2.13 KB
/
static_test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<html>
<head>
<meta charset="UTF-8"/>
<title>Matomo - Static Test</title>
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//localhost:8090/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
<style>
body {
padding: 2em;
}
main {
max-width: 960px;
margin: 0 auto;
}
.admonition {
background-color: #f0f0f0;
padding: 1em;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<main>
<p class="admonition">⚠️ Please check if your ad blocker is active, otherwise you
won't be generating impressions with this page!</p>
<h2>Matomo "Impression Generation" test page</h2>
<p>This file logs impressions to Matomo. <br \>
Go to <a href="http://localhost:8090">http://localhost:8090</a> to see
the Matomo dashboard and check if the impressions come in.</p>
<h4>Adding tracking parameters</h4>
<p>You can add campaign and keyword parameters to the URL. In a
default Matomo installation, the parameter names are <code>mtm_campaign</code> and
<code>mtm_keyword</code>. You can look up other allowed parameter names (like
<code>piwik_campaign</code>, <code>pk_campaign</code> and even Google-Analytics-style
<code>utm_campaign</code>) in the file <code>global.ini.php</code> of the Matomo
configuration Look for the config keys <code>campaign_var_name</code> and
<code>keyword_var_name</code>. </p>
<p>Here is a link to this page with test campaign and keyword parameters attached:
<a
href="static_test.html?pk_campaign=Test_Campaign01&piwik_keyword=Test_Keyword_007">Test_Campaign
and Keyword</a></p>
</main>
</body>
</html>