2

I´m trying to use Google analytics on my genexus based application, but I run into some problems regarding the domain name property, or the lack of it sometimes.

To contextualize a bit, I have an application which runs in Apache Tomcat can´t figure out a way to make Google Analytics work with it when setting it up from the genexus properties. I´ve tried to add the Google Analytics control to my masterpage and set up the properties for ir to work, but since the domain name will change based on which server is runing my webapp, I can't find a way around this.

1

If possible, I want to make each instalation of the webapp to generate data to a different Property on Google Analytics Control Panel, but the only way I've managed to make google analytics work with genexus is using an external .js file using the code google analytics gave me, and doing this way I can't make each application send data to a different Property. My ideia was on the Start Event of the master page, to set the info needed like this:

GoogleAnalytics1.Code = &var1
GoogleAnalytics1.DomainName = &var2

Where &var1 and &var2 where loaded earlier in the event. I've tried to make it work setting it up through the properties to see if I was doing something wrong in the attribuition but didn't work either. The only way I found to make it work is to write the .js file and add it to the Knowledge Base as an external file and call it in the master page Start Event. I saw that this was improved on GX17 U10 but I haven't found any other coments on this. Also, I could not find the .js file generated by genexus when I set the Google Analytics Control in my MasterPage, my hope was to see if there is any difference in the file generated by Genexus and the file suggested by Google. Is there any way for me to find this file or some other thing I need to set it up on my Knowledge Base to make it work? I've tried to look on genexus wiki but didn't find anything there.

At the start, I thought the lack of the DomainName was the problem, but I've managed to make it work without a domain name using the static .js file, so right now I'm not so sure about what's the problem here.

vimuth
  • 5,064
  • 33
  • 79
  • 116

0 Answers0