Page History
...
The SendGoal JavaScript Function
This The SendGoal function allows for sending you to send JavaScript based goals via the client agent. The Agent uses Ajax AJAX (Asynchronous JavaScript and XML) to send the goal event to the server, and will does not affect the user interaction 's experience with the page in any way.
Code Sample:
<input type="button" value="Signup to Newsletter" onclick="document.__Page.SendGoal(1);" />
The SendGoal function accepts the following parameter:
- Goal ID - Required. Note: Goals are created in
...
...
- After creating the goal, the Goal ID can be found in the tab_goals table (column - id) in the CardioLog database.
Monitoring JavaScript
...
Based Goals
In order to
...
identify a JavaScript based goal, such as signing up
...
for a newsletter, define the goal
...
, and make a call to the CardioLog SendGoal function.
Assuming the signup button was implemented
...
using simple HTML, the following code sample should work:
<input type="button" value="Signup to Newsletter" onclick="document.__Page.SendGoal(1);" />
Goal Reports
...
: To monitor your goal progress, use the
...
Goal reports, and select the relevant goal in the Visitor Segments > Goal field of the widget preferences.
Monitoring Internal E-Mail Campaigns using the __referrer Parameter
The CardioLog Client-Side API supports capturing identifying and monitoring external referrerslocations. You can use the _referrer parameter whenever you publish a link to your monitored environment and you wish to track the source of the referring page (e.g. email).For . This is most commonly used in email or social media. For example, if you have included an internal link in a promotional email add the __referrer parameter to be able to track the number of visits users who visited your site via this link produced:Define . Define a unique referrer name that will be displayed in reports, such as __referrer=email_promotion_12_Dec_2008
2016 in order to display the link accordingly:
http://myportal/sites/rnd/default.aspx?__Referrer=email_promotion_
...
Dec_
...
How many visitors arrived on my page through my email campaign? To see how many visitors arrived on your page through your email campaign, use the Navigation > the Internal Traffic Sources report (either chart or table), and select the relevant page in the Website Item URL field.
CardioLog Server-Side API
By Using using the CardioLog Server-Side API -, CardioLogAPI/Events.asmx web service, and the SendEvent method - , you can send view, duration and search events, as well as custom events, and track the URL of the referrer page.
The SendEvent Method
The SendEvent method in the CardioLogAPI/Events.asmx web service accepts the following parameters:
- UserName - Optional. The user associated with the event. If not passed, the method will use the current user credentials.
SessionId - SessionID - Required. The unique session
Id - ID associated with the event.
- Event Type - Required. The event
type Id (such as 0 for "View").- type ID number
- URL - Required. The URL
associated with - of the page where the event occurred.
- UserAgent - Optional. The user details
, such as - including browser type and OS version.
- ClientIP - Optional. The user IP address
of the client station- .
- Param1 - Optional. Used to store additional information about the
event (- event, typically for custom event types
) - limited - . This string is limited to 1000 characters.
In built- Built-in events
it is reserved by the the - reserve this string for the system. For example
- - , in a "
View- Visit" event it
is used to store - stores the referrer information
, - ; in a "Search" event it
is used to store - stores the search term.
- Param2 - Optional.
Used - Used to store additional information about the
event (- event, typically for custom event types
) - limited - . This string is limited to 50 characters.
In built- Built-in events
it is reserved by the the - reserve this string for the system. For example
- in a - , in a "Search" event it is used to store the number of results.
After the event is sent, the web service XML response will include the event identifier for future use, which you can later use to send events related to this event
...
accordingly:
<agent>
<log>
<status id='0'>OK</status>
<event id='211022'/>
</log>
</agent>
In case of an error, the XML response will include the error description:
<agent>
<log>
<status id='-1'>Invalid Path</status>
</log>
</agent>
Anchor | ||||
---|---|---|---|---|
|
The SendEvent method supports the following event types:four event types. The ID number is used in the Server-Side API. The Event Type Title is used in the Client-Side API.
- View -
...
- Individual page
...
- request, or element clicked
- Event Type
...
- ID - 0
...
- Event Type Title - "Visit"
...
To set the page referrer, use the following optional parameters
...
to track the source of the page:
- Param1 -The related view event ID or a string representing referrer types (traffic sources such as navigation toolbars, campaigns, banners, etc.).
- Param2 -The referrer page URL
Referrer pages can be retrieved in CardioLog with the "Navigation" visual controls.
- Duration -
...
- Time spent on a page or element (in seconds).
- Event Type Id ID - 1
- Event Type Title - "Leave"
- URL - The related view event URL.
- Param1 - Duration in seconds.
- Param2 - The related view event ID.
- Search - Onsite (internal) search
- Event Type
...
- ID - 2
- Event Type Title - "Search"
- URL - The related view event URL.
- Param1 - Search keyword/phrase.
- Param2 - Number of search results.
Search events can be viewed in CardioLog
...
in the
...
Onsite Searches
...
report, popular search terms are displayed in the
...
Onsite Search Phrases
...
report.
- Search Result Click -
- Event Type
...
- ID - 5
- Event Type Title - "SearchResultClick"
- URL - The search result URL.
- Param1 - The search result position within search results.
- Param2 - The related search event ID.
Anchor | ||||
---|---|---|---|---|
|
You can create custom event types and build and build custom reports using the CardioLog SDK. The custom event types can be used in the SendEvent function (in both Client-Side and Server-Side APIs).
...
INSERT INTO tab_event_type(id,description)
VALUES(100, 'Item-Sold')
GO
Id ID - must be 100 or higher
descriptionDescription - event type title
2. Add the custom event type to the CardioLog tracking agent events array - edit the __eEvents array and add the custom event type in:
For MOSS 2007 only:
[CardioLog installation directory]\CardioLogAgent\MOSS2007_1.2.js
For SharePoint 2010 only:
[CardioLog installation directory]\CardioLogAgent\SP2010_1.2.js
For SharePoint 2013 only:
[CardioLog installation directory]\CardioLogAgent\SP2013_1.2.js
Note: If you have implemented the Tracking Agent using the " CardioLog Analytics " SharePoint Feature on your WFEs - edit WFE (Web Front End), edit the __eEvents array and add the custom event type intype accordingly:
For MOSS 2007 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\CardioLogAgent\MOSS2007_1.2.js
For SharePoint 2010 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\SP2010_1.2.js
For SharePoint 2013 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\SP2013_1.2.js
...