Copy link to clipboard
Copied
Hi,
I need to set up analytics to get current site page visits. How do I set it up on Coldfusion?
Thanks!
Copy link to clipboard
Copied
Well, using GA is mainly about setting up just a couple lines of html which call Javascript provided by Google. There's really nothing cf-specific about it.
That said, since you'd likely want the js to be on every page. Assuming you create traditional cfml apps and no particular framework, the easiest way to include any code on all pages is via the application.cfm or onrequestend.cfm (old school) or the onrequestendstart/onrequest/onrequestend methods of application.cfc (newer school).
If that may be enough for you to run with, great. If not, let us know where you may need more clarification.