Old webforms application ASP.NET Intergration

10 posts, 0 answers
  1. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 27 Mar 2014 Link to this post

    I am trying to add eqatec to a asp.net webforms application (NOT MVC).
    The example documentation while an interesting read does not seem to work to well in my environment and type of application.
    http://docs.telerik.com/platform/analytics/integration/monitor/platform/aspnet

    I have a master page and I have tried putting the eqatec code here, but I am just missing a step it seems to me...

    It throws a Uncaught TypeError: Cannot call method 'trackException' of undefined...   Any ideas?

    I would love to see a traditional asp.net web form example in their documentation.


    01.<script type="text/jscript" src="<%= ResolveUrl("~/Scripts/EqatecMonitor.min.js")%>"></script>
    02.   <script type="text/javascript">
    03.       //=====================================================
    04.       //===   EqatecMonitor
    05.       //=====================================================
    06.       (function (g) {
    07.           if (g._eqatecmonitor)
    08.               return;
    09.           try {
    10.               //Create the monitor instance
    11.               var settings =_eqatec.createSettigns("myKey");
    12.              
    13.               var monitor = g._eqatecmonitor = _eqatec.createMonitor(settings);
    14.               //Start your monitor when your application starts
    15.               monitor.start();
    16. 
    17.           } catch (e) {
    18.               monitor.trackException(e);
    19. 
    20.               console.log("Telerik Analytics exception: " + e.description);
    21.           }
    22.       })(window);
  2. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 27 Mar 2014 in reply to Wired_Nerve Link to this post

    So I found a error in my typing, createSettigns and fixed it.

    Now I am not throwing an exception here, but my home.aspx page is saying the trackFeature is undefined...
            Uncaught TypeError: Cannot call method 'trackFeature' of undefined

    <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Nav.Master" AutoEventWireup="true"
        CodeBehind="Home.aspx.cs" Inherits="TIPWebIT.Home" %>
     
    <%@ MasterType TypeName="TIPWebCommon.MasterPages.HayesMasterPage" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script type="text/javascript">
            window._eqatecmonitor.trackFeature("Hello");
        </script>

  3. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 27 Mar 2014 in reply to Wired_Nerve Link to this post

    For now to just get this to work I moved the code to the page I want to track...


    So the code looks like this now:
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script type="text/jscript" src="<%= ResolveUrl("~/Scripts/EqatecMonitor.min.js")%>"></script>
        <script type="text/javascript">
            //=====================================================
            //===   EqatecMonitor
            //=====================================================
            (function (g) {
                if (g._eqatecmonitor)
                    return;
                try {
                    //Create the monitor instance
                    var settings = _eqatec.createSettings("myProductID");
                    settings.version = "9.1.0.0";
                    var monitor = g._eqatecmonitor = _eqatec.createMonitor(settings);
                    //Start your monitor when your application starts
                    monitor.start();
     
                } catch (e) {
                    monitor.trackException(e);
     
                    console.log("Telerik Analytics exception: " + e.description);
                }
            })(window);
            window._eqatecmonitor.trackFeature("MySite.IT.HOME");
        </script>





    Host: myKeyValue.monitor-eqatec.com
    Connection: keep-alive
    Content-Length: 418
    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36
    Content-Type: text/plain
    Accept: */*
    DNT: 1
    Accept-Encoding: gzip,deflate,sdch
    Accept-Language: en-US,en;q=0.8
     
    {"version":"9.1.0.0","
     
     
     
    In fidler via the inspectors I got this message
    <Response status="success" message="data not accepted" />




  4. Rick Atkinson
    Rick Atkinson avatar
    11 posts
    Member since:
    Feb 2010

    Posted 11 Jun 2014 Link to this post

    I have been trying to integrate into a web forms app as well.  below is the js i am injecting into each page via a base class page:

    <script src="/Scripts/EqatecMonitor.min.js" type="text/javascript"></script>
    <script>
        (function(g) {
            if (g._eqatecmonitor) return;

            try {
                var settings = _eqatec.createSettings('############');
                settings.version = '4.0';
                var monitor = g._eqatecmonitor = _eqatec.createMonitor(settings);
                monitor.start();
                monitor.trackFeature('Page Name');
                monitor.stop();
            } catch (e) { console.log('Analytics exception: ' + e.description); }
        })(window);
    </script>

    Reviewing the Network traffic in Chrome, I see that a post is successfully made for this.  However, I do not see any result of this within the Platform.  

    In addition, I am not even sure this is the best approach.  The documentation indicates using this within a SPA.  However, the app is more of a traditional web forms app.  The above code will be called on each page load.  Will this lead to performance issue or 'cloud' the data represented within the Platform?

    I am instantiating via the global.asax on the server side.  However, I need more metrics such as which pages are being hit.

    Would really like to see some best practices around this.  Specifically, around using within a Web Forms application.

    Thanks, Rick
  5. Richard Flamsholt
    Admin
    Richard Flamsholt avatar
    28 posts

    Posted 12 Jun 2014 Link to this post

    Hi Rick,

    You're right that a SPA is the ideal scenario for the Javascript monitor.

    You can, however, surely use it from any web application. The only data that will be "clouded" is the number of sessions recorded for your application, as each page load will add to that number, so it will rather be "number of page loads". That's the inherent nature of non-SPA web apps.

    Your code example is actually fine, and don't worry about performance issues.

    We have specific documentation for integrating into an ASP.NET app, which you may find useful. You can find it here:
    http://docs.telerik.com/platform/analytics/integration/monitor/platform/aspnet

    Regarding not seeing any data: if you send data from a Javascript monitor then it must be to a Javascript Analytics project. I can see that you have created 2 projects on your account, both for .NET. To send data from your web forms app you should create a Javascript project and use that project key. You can check out more about this here:
    http://docs.telerik.com/platform/analytics/getting-started/your-first-data#monitor
    http://docs.telerik.com/platform/analytics/integration/data-lifecycle/introduction#receiving-data

    I hope this answers your question. Feel free to contact us again if you have more.

    Regards,
    Richard Flamsholt
    Telerik
     
    EQATEC Application Analytics is now Telerik Analytics. For more information on the new name, plus what's new in Telerik Analytics, please, check out the Analytics Service Announcement.
     
  6. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 12 Jun 2014 in reply to Richard Flamsholt Link to this post

    Richard,

    Your example (  http://docs.telerik.com/platform/analytics/integration/monitor/platform/aspnet ) is for MVC applications.  We are talking about traditional asp.net web form application projects...  We need a better example of this... 
  7. Michael W. Olesen
    Admin
    Michael W. Olesen avatar
    1 posts

    Posted 17 Jun 2014 Link to this post

    Hi Warren,

    We mailed on this exact subject and on this ticket back in late March / early April this year. Including our conversation:

    ---

    Great. Looking forward to hear from you.

     

    Regards,

    Michael

     

    From: Warren LaFrance [mailto:wlafrance@hayessoft.com]
    Sent: Tuesday, April 1, 2014 4:12 PM
    To: Michael Olesen
    Subject: RE: Telerik Analytics - does it work for you?

     

    We are closer to getting it to work.

     

    I will be looking at the code later this week (wed) and picking that project backup then.

     

     

    From: Michael Olesen [mailto:Michael.Olesen@telerik.com]
    Sent: Monday, March 31, 2014 4:13 AM
    To: Warren LaFrance
    Subject: RE: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    I am just reminded, that you’re having a support case (ID: 803691) with us regarding utilization of the monitor. What is the latest status on your side?

     

    Regards,

    Michael

     

    From: Michael Olesen
    Sent: Friday, March 28, 2014 10:46 AM
    To: 'Warren LaFrance'
    Cc: Eigil Rosager Poulsen
    Subject: RE: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    Have you remembered to include the JavaScript file for the page (that’s done in ie. the (every) MasterPage for example) like I describe:

     

     

    I know this is an example from the ASP.NET MVC 3+ world, but a similar thing should be done in any other web-platform. I am thinking in the line of this, where “lostlander” suggests in Sept 2006:

     

     

    Regards,

    Michael

     

    From: Warren LaFrance [mailto:wlafrance@hayessoft.com]
    Sent: Thursday, March 27, 2014 9:10 PM
    To: Michael Olesen
    Cc: Eigil Rosager Poulsen
    Subject: RE: Telerik Analytics - does it work for you?

     

    I followed the online example and did my best to convert it to my asp.net webforms application but the javascript code just seems to be throwing an error…

    So I must have something wrong.

     

    The settings is defined as undefined..

     

     

     

     

     

     

     

     

    From: Michael Olesen [mailto:Michael.Olesen@telerik.com]
    Sent: Thursday, March 27, 2014 10:21 AM
    To: Warren LaFrance
    Cc: Eigil Rosager Poulsen
    Subject: RE: Telerik Analytics - does it work for you?

     

    Welcome. Feel free to come back for further elaborations.

     

    Regards,

    Michael

     

    From: Warren LaFrance [mailto:wlafrance@hayessoft.com]
    Sent: Thursday, March 27, 2014 4:20 PM
    To: Michael Olesen
    Subject: RE: Telerik Analytics - does it work for you?

     

    Thanks for the explanation. I roll back and start over on this. Much appreciated.

     

     

     

    From: Michael Olesen [mailto:Michael.Olesen@telerik.com]
    Sent: Thursday, March 27, 2014 10:18 AM
    To: Warren LaFrance
    Cc: Eigil Rosager Poulsen
    Subject: RE: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    As I mention in the article the JavaScript monitor will work for any web scenario. It was just exemplified in MVC (JavaScript). The principles work in MVP (Web Forms), PHP, JSP…. As long as the client side follows the convensions:

     

    1. On each page load:

      1. Instantiate a monitor

      2. Start()

    2. While running, track (feature, timing, value, exceptions)

    3. When ending session (the logic of this depends on the application) Stop().

     

    What you are doing in your code is actually doing server-side tracking. Is that what you want? Since server-side tracking is technically possible, we discourage that. Analytics is meant to be a client-side thing. When you do it server-side, the terms session (user) are server-settings. Start/Stop … you can do that as part of application management, but this means that you start to track when ASP.NET decides to start and stop the applications which have a lot to do which AppPool behavior etc. Individual users are now individual servers…

     

    I really encourage you to think about what you want to get out of this.

     

    If you feel like, we can have an online meeting where I can explain you a little more about what this whole animal is all about, how it works in detail etc.

     

    Regards,

    Michael

     

    From: Warren LaFrance [mailto:wlafrance@hayessoft.com]
    Sent: Thursday, March 27, 2014 3:49 PM
    To: Michael Olesen
    Subject: RE: Telerik Analytics - does it work for you?

     

    The guidelines listed in link seem to be for a MVC and our application is a ASP.NET WEB FORMS application (not mvc).

    Do you have a link for traditional asp.net web forms?

     

     

     

     

    I have done the following based on a document I found on the web…

    ---In the global.ascx on start and end events.

     

     

     

    1. Added reference to the

    2. Added code to the global ascx file

     

     

     

     

    From: Michael Olesen [mailto:Michael.Olesen@telerik.com]
    Sent: Thursday, March 27, 2014 9:24 AM
    To: Warren LaFrance
    Subject: RE: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    As Eigil mentioned, I wrote the documentation and will happily help you out. In short, the Nuget packages have been revoked. Follow the guide-lines in the link you referenced below. And do not hesitate to come back, if you need assistance.

     

    Regards,

    Michael

     

    From: Eigil Rosager Poulsen
    Sent: 27. marts 2014 15:14
    To: 'Warren LaFrance'
    Subject: RE: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    Thank you for your reply!

     

    Here in the office I have the Sales Engineer Michael Olesen who actually wrote the documentation page you are referring to. He said, yes you should follow those instructions, but he will reach out to your shortly and help you get started.

     

    Please get back to me if you need assistance with other issues.

     

    Good luck with the evaluation!

     

    Best regards,

     

    Eigil

     

     

    From: Warren LaFrance [mailto:wlafrance@hayessoft.com]
    Sent: 27. marts 2014 14:57
    To: Eigil Rosager Poulsen
    Subject: RE: Telerik Analytics - does it work for you?

     

    Eigil,

     

    Thanks for the taking the time to help out. I am reading over the documentation for integration of the monitor in asp.net applications.

     

    I found the product in the NUGET package installer in VS 2013, does this tool do most of the project setup and install or do I need to follow the steps @ this link?

    http://docs.telerik.com/platform/analytics/integration/monitor/platform/aspnet

     

    For example, after running the NUGET package I do not see the EqatecMonitor.min.js file in the scripts folder… (So I suspect the NUGET package installer is not the right way…)

     

     

     

    Our application is a ASP.NET 4.5 Web Forms application. Not MVC…

     

     

     

     

    Thanks for your time!

     

     

    Warren C. LaFrance

     

     

    From: Eigil Rosager Poulsen [mailto:Eigil.Poulsen@telerik.com]
    Sent: Tuesday, March 25, 2014 3:30 AM
    To: Warren LaFrance
    Subject: Telerik Analytics - does it work for you?

     

    Hi Warren,

     

    I am the founder of EQATEC Analytics that Telerik has acquired.

     

    I am the one in Telerik that have met or spoken with most Analytics clients, and I know all parts of the Analytics technology, so you are welcome to send me any question during your evaluation. I will most likely be able to answer all questions you have immediately.

     

    We have done a lot to make all information available and easy to understand, but I know from experience that new users can end up spending a long time trying to answer questions that I can answer in no time. So please reach out directly! I am located in Copenhagen.

     

    My background is in software development and I can discuss the solution from both a technical and business perspective.

     

    You are welcome to connect with me on LinkedIn: http://www.linkedin.com/in/eigilrosagerpoulsen

    or you can ping me on Skype: erp.eqatec

     

    Do you think Analytics is something for your organization? Looking forward to hear from you!

     

    Best regards,

     

    Eigil

     

     

    Telerik

    Eigil Rosager Poulsen

    Managing Director, Nordics

    t (Mob) +45 2840 8603 | (Dir) +45 7372 4111

    e eigil@telerik.com

    w www.telerik.com

     

     

     



    ---

    Regards,
    Author Michael W. Olesen
    Telerik
     
    EQATEC Application Analytics is now Telerik Analytics. For more information on the new name, plus what's new in Telerik Analytics, please, check out the Analytics Service Announcement.
     
  8. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 14 Jan 2015 in reply to Wired_Nerve Link to this post

    Rick,

    Did you ever get this working?
  9. Richard Flamsholt
    Admin
    Richard Flamsholt avatar
    28 posts

    Posted 20 Jan 2015 Link to this post

    Hi Warren,

    Did Rick get back to you? If he didn't, or did but didn't have any news, then I'll close this particular support case. If you agree then you don't need to respond - we can continue discussions in the other "Analytics not showing up..." support case.

    Regards,
    Richard Flamsholt
    Telerik
     
    EQATEC Application Analytics is now Telerik Analytics. For more information on the new name, plus what's new in Telerik Analytics, please, check out the Analytics Service Announcement.
     
  10. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 20 Jan 2015 in reply to Richard Flamsholt Link to this post

    Go ahead and close.
Back to Top