Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
Google Analytics. |
Fri, Mar 6 2015 6:44 PM | Permanent Link |
Steve Gill | Has anyone successfully added Google Analytics code to their EWB apps?
= Steve |
Sun, Mar 8 2015 6:39 AM | Permanent Link |
Matthew Jones | Steve Gill wrote:
> Has anyone successfully added Google Analytics code to their EWB apps? Not me. Look forward to your report on how to do it. 8-) -- Matthew Jones |
Tue, Mar 10 2015 10:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Steve,
<< Has anyone successfully added Google Analytics code to their EWB apps? >> The TScript component is the ticket. Just load the GA script dynamically using it (be sure to pay attention to the https/http part of the URL property), and in the OnLoad event handler for the script, go ahead and manipulate the GA objects as needed. Attached it the classic GA external interface unit. You'll have to add the new universal GA interface, if that's what you want to use. You would use it like this: unit Unit1; interface uses WebCore, WebForms, WebCtrls; type TForm1 = class(TForm) Script1: TScript; procedure Script1Load(Sender: TObject); procedure Form1Show(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses GAInterface, WebHTTP; procedure TForm1.Script1Load(Sender: TObject); var TempTracker: TGAPageTracker; begin try TempTracker:=_gat._getTracker('UA-15048886-1'); TempTracker._trackPageview; LogOutput('Consider this application tracked'); except end; end; procedure TForm1.Form1Show(Sender: TObject); begin Script1.URL:='http://www.google-analytics.com/ga.js'; end; end. Of course, be sure to remove the LogOutput() call for production usage, and please don't keep using our tracking ID. Tim Young Elevate Software www.elevatesoft.com Attachments: GAInterface.wbs |
Tue, Mar 10 2015 4:27 PM | Permanent Link |
Steve Gill | << Of course, be sure to remove the LogOutput() call for production usage, and
please don't keep using our tracking ID. >> Ha ha. That's awesome - thanks Tim. = Steve |
This web page was last updated on Friday, September 13, 2024 at 03:42 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |