Tracking Your IDX Account With Google Analytics

When you are using a RealtyNinja Listing Only IDX account, you have to jump through a couple of extra hoops to get Google Analytics working properly. Because you really have 2 sites (the top level site you are embedding the IDX into and the embedded IDX), you will need to setup 2 analytic accounts.

The first one you setup and install on your top level site (probably wordpress) the same as you always have. But if you want to track what listings people click on, you will have to create a second google analytics profile for your RealtyNinja domain which looks like 'sitename.realtyninja.com'. Make sure that when you create the code you choose the new "Universal Analytics" option. Once you have the code snippet, you want to put it into your RealtyNinja "Custom Code" settings page; specifically in the "Custom Header Code" form field. Once you have the code in there, you need to make one small change. You need to replace this line:

  • ga('send', 'pageview');

With this line:

  • ga('send', 'pageview', window.location.pathname);

This will make sure that the proper page names are reported and that all is well. And of course, please get in touch with us if you have any questions or need help.

Still need help? Contact Us Contact Us