• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to add google analytics script to ColdFusion

New Here ,
May 31, 2022 May 31, 2022

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!

Views

308

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 31, 2022 May 31, 2022

Copy link to clipboard

Copied

LATEST

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. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation