Home > Backend Development > PHP Tutorial > javascript - Can the var u = 'installed url' in the piwik tracking code be replaced with an IP address?

javascript - Can the var u = 'installed url' in the piwik tracking code be replaced with an IP address?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-10-12 10:04:09
Original
950 people have browsed it

I want to replace the url with the IP address in piwik’s tracking code to save the step of parsing

<code><!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//linlin.ngrok.com/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '11']);
    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+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//linlin.ngrok.com/piwik.php?idsite=11" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --></code>
Copy after login
Copy after login

But changing var u in the code to the corresponding IP cannot be traced. I don’t quite understand. Do I need to modify any configuration of piwik?

Reply content:

I want to replace the url with the IP address in piwik’s tracking code to save the step of parsing

<code><!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//linlin.ngrok.com/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '11']);
    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+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//linlin.ngrok.com/piwik.php?idsite=11" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code --></code>
Copy after login
Copy after login

But changing var u in the code to the corresponding IP cannot be traced. I don’t quite understand. Do I need to modify any configuration of piwik?

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
What are JavaScript hook functions?
From 1970-01-01 08:00:00
0
0
0
What is JavaScript garbage collection?
From 1970-01-01 08:00:00
0
0
0
c++ calls javascript
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template