Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattpiwik <matthieu.aubry@gmail.com>2009-02-11 03:45:00 +0300
committermattpiwik <matthieu.aubry@gmail.com>2009-02-11 03:45:00 +0300
commite27435e372d88a96d1d83882443a9226f376cf59 (patch)
tree5626f4d00c1b06ec761d9ba19b08579ea1ffeee0 /misc/testJavascriptTracker/page2.php
parentbdd6990ea601273f1f46c763479f1a0c4a13bc74 (diff)
- patch by vipsoft: fix #141, #248, #351
piwik.js: Wildcard support in piwik_hosts_alias piwik.js: Add option to override special css classes to ignore piwik.js: Forcing a click as download does not work when the link has multiple CSS classes git-svn-id: http://dev.piwik.org/svn/trunk@887 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'misc/testJavascriptTracker/page2.php')
-rw-r--r--misc/testJavascriptTracker/page2.php54
1 files changed, 39 insertions, 15 deletions
diff --git a/misc/testJavascriptTracker/page2.php b/misc/testJavascriptTracker/page2.php
index bffd36cd9a..cf53d38d11 100644
--- a/misc/testJavascriptTracker/page2.php
+++ b/misc/testJavascriptTracker/page2.php
@@ -11,24 +11,32 @@ And test the tracker by clicking all the links below, with several browsers...<b
<br />
</div>
-<a href="http://www.google.fr"> Site web de google france </a> <br />
-<a href="http://www.yahoo.fr"> Site web de yahoo france </a> <br />
-<a href="http://www.google.com"> Site web de google monde </a> <br />
-<a href="http://maps.google.fr"> Site web de google maps </a> <br />
-<a href="http://piwik.org"> Site web de piwik </a> <br />
-<a href="http://piwik.org/blog"> Site web de piwik </a> <br />
-<br />
-<a href="./test.pdf"> download pdf (rel) </a> <br />
-<a href="./test.jpg"> download jpg (rel) </a> <br />
-<a href="./test.zip"> download zip (rel) </a> <br />
-<a href="
-<?php echo $url; ?>
-test.rar"> download rar (abs) </a> <br />
-<br />
+<script type="text/javascript">
+<!--
+piwik_ignore_classes = ["no-tracking"];
+//-->
+</script>
+<h1>Ignore classes</h1>
+<a href="http://www.yahoo.com">Expecting a yahoo.com outlink</a> <br />
+<a href="http://piwik.org" class="piwik_ignore">Ignore this piwik.org outlink</a> <br />
+<a href="http://dev.piwik.org" class="no-tracking">Ignore this dev.piwik.org outlink</a> <br />
+
+<script type="text/javascript">
+<!--
+piwik_download_extensions = ".zip";
+//-->
+</script>
+<style type="text/css">
+a.boldlink {font-weight: bold}
+</style>
+<h1>Multiple classes</h1>
+<a href="./test.pdf" class="piwik_download">Track this download pdf (rel) </a> <br />
+<a href="./test.jpg" class="boldlink piwik_download">Track this download jpg (rel) </a> <br />
+<a href="./test.zip" class="boldlink no-tracking">Ignore this download zip (rel) </a> <br />
+
<a href="./index.php"> Prev (rel)</a> <br />
<a href="<?php echo $url; ?>index.php"> Prev (abs)</a> <br />
-
<!-- Piwik -->
<a href="http://piwik.org" title="Web analytics" onclick="window.open(this.href);return(false);">
<script language="javascript" src="<?php echo $urlPiwik; ?>/piwik.js" type="text/javascript"></script>
@@ -43,3 +51,19 @@ piwik_log(piwik_action_name, piwik_idsite,piwik_url);
<noscript><p>Web analytics <img src="<?php echo $urlPiwik; ?>/piwik.php" style="border:0" alt="piwik"/></p>
</noscript></object></a>
<!-- /Piwik -->
+
+<script type="text/javascript">
+
+var testPkIsSiteHostname = false;
+if(testPkIsSiteHostname) {
+ // automated testing
+ _pk_hosts_alias = ["*.example.com"];
+
+ if (_pk_is_site_hostname("localhost")) alert("failed: localhost does not match");
+ if (_pk_is_site_hostname("google.com")) alert("failed: google.com does not match");
+ if (!_pk_is_site_hostname("example.com")) alert("failed: example.com does match");
+ if (!_pk_is_site_hostname("www.example.com")) alert("failed: www.example.com does match");
+ if (!_pk_is_site_hostname("www.sub.example.com")) alert("failed: www.sub.example.com does match");
+}
+</script>
+