Using IP instead of hostname in the snippet


#1

Hi everyone,

This is my first post. So I’ll just jump right into it.

I need to be able to use the Piwik snipped not only on web servers that are behind firewalls, but also on webservers that use wildcard DNS servers that always resolve to themselves (it’s a long story).

Basically, I need to be able use the IP address of the Piwiki server in the snippet of javascript code for the pages rather than the full hostname.

Is that possible to do?

Thanks!


(Thomas Seifert) #2

Thats just a server configuration issue. You need to put in some URL under which piwik can be reached. If your server is configured to use the ip for the piwik install it should work.


#3

Thanks for the reply Thomas.

Here’s my scenario. I have web servers that are connected to the internet on one interface but the server handles web requests on another interface where the user doesn’t have access to the normal internet (like a sand-box/wall-garden scenario). These web servers will sit behind other firewalls so they will have fake domain names. My plan is to get the javascript snippet to connect back to the Piwik server for tracking data on these “hidden” web servers.

I could really use a writeup of the technical details of how Piwik does it’s thing. I haven’t found anything on this on the Piwik.org website.

Questions:

  1. If the snippet uses a raw IP will my Piwik server know to file the site hits under the correct domain, say “awesomesite.com”?

Here I have replaced the hostname with a simple IP address. Should this work? (I have replaced the IP address with Piwik’s to protect the innocent)

Thanks very much for your time!
Todd


(Thomas Seifert) #4

Well, to cut the long story short:
can the user reach http://208.87.32.75/piwik/ and sees the piwik login page there? If so, yes, piwik will be able to do its tracking. If not, correct your server configuration.


#5

Awesome. Thanks for the help!