NuConomy SOAP API
The NuConomy SOAP API allows you to not only track desired site activities; additionally, you can export every report in the system to other interfaces. Our SOAP API was built and tested across multiple platforms and programming languages (e.g. PHP, .NET, Pearl). Although you can exclusively use the SOAP API, we recommend you use it in combination with our client side JavaScript API for two main reasons:
- When you use the SOAP API, you make calls from your backend servers. If you have a high traffic site, this result in a significant number of API calls that could degrade server performance. Thus, we highly recommend tracking activities, such as page views, from the client side, thereby pushing the API calls to the client computer rather than your own servers.
- 2. In order to track activities at the individual user level, we use first party cookies. This is very powerful data and functionality. In order to have this data, you must track at least one activity using our JavaScript API and, hence, place at least one first party cookie on the user’s machine.
Tracking Activities Using the SOAP API
If you are already familiar with our JavaScript API, you will find that you already know how to use our SOAP API. With a few minor differences, the SOAP API implements using the same methods as our JavaScript API.
Referencing the NuConomy SOAP API
To reference our SOAP API, add a reference to this address:
https://services.nuconomy.com/ExternalServices.asmx
You can see the WSDL of our API by visiting this address:
https://services.nuconomy.com/ExternalServices.asmx?wsdl
Tracking Activities
You can use the LogActivity SOAP method to track activities on your site. The LogActivity method accepts just one type of parameter: ExternalLogMessage; this structure allows you to send all the information about the tracked event.
ExternalLogMessage Structure
The ExternalLogMessage is a simple structure you use to send information about a tracked event. Here is a list of the parameters that can be tracked using this method:
- ProjectToken – This is the unique server side token assigned
to you by NuConomy. For security reasons, this token is different from the client
side token you use in your JavaScript API calls. You should keep this SOAP token
secret so that undesired visitors (e.g. hackers) will not be able to perform calls
while impersonating your organization.
- ActivityId – This is the ID of the activity you want to
track. You can get the ID of the activities you track – and create new activities
to track – in the Administration tab of the NuConomy Studio.
- VisitorUserId – If you are tracking a registered user,
you should send the UserID in this parameter. For anonymous users, send an empty
string (note: do not send the word “Anonymous”).
- ContentId - Unique ID that identifies a specific piece
of content (e.g. video ID, product ID, blog permalink).
- ContentTitle – The title of the content being tracked.
This title will appear in the reports; thus, it should be a title that will be meaningful
to users of the system.
- ContentOwnerUserId – The ID of the user that “owns” the
content being tracked. Please refer to the definitions section [insert link here]
for more information on this parameter and its meaning.
- ContentType – The ID of the content type you are tracking.
You can manage the content types you track in the Administration tab of the NuConomy
Studio.
- LogActivityValue – The numerical value for the tracked
activity. For most activities, the value will be “1” (representing one comment,
one video play, etc.); however, this can be any number. For example, situations
where this could be a different number include (1) the number of stars a user chose
to rate a piece of content or (2) the amount of dollars of an e-commerce purchase.
- Tags – Associated metadata for the content being tracked.
Tags should be separated with a semicolon (;).
- GenericDimension1 – If used, the first customized segmentation
you created for your data. These customized segmentations can be created and managed
in the Administration tab of the NuConomy Studio.
- GenericDimension2 – The second customized segmentation
you created for your data.
- GenericDimension3 – The third customized segmentation you
created for your data.
- GenericDimension4 – The fourth customized segmentation
you created for your data.
- GenericDimension5 – The fifth customized segmentation you created for your data.
There are two additional parameters you need to send with every call. These parameters should contain the values of two client side first party cookies we set using the JavaScript API. By sending these parameters, you allow the system to associate server side events with client side events that happen in the same session. The two parameters are:
- NUCCOOCookie – should contain a cookie named “nuccoo”.
- NUCUSECookie – should contain a cookie named “nucuse”.
Code Examples
Click on the following links to find code examples for using the NuConomy SOAP API:
- PHP - Tracking events using the LogActivity method
- Setting content metadata
- .NET C# - Tracking events using the LogActivity method. Code VS2008 Solution
Running Reports Using The SOAP API
The NuConomy SOAP API allows you to not only track desired site activities; additionally, using this API you can export data collected through NuConomy into other interfaces, including your backend systems, and also use the data to dynamically change and optimize your site, create new kind of user experiences, and achieve specific business goals. If you have problems accessing data through the API, please contact us directly at support@nuconomy.com.
To use the SOAP API, you need to follow these simple steps:
- Reference the NuConomy SOAP API
To reference the SOAP API, add a reference to this address: https://ws.nuconomy.com/v0.6/ReportsGenerator.asmx.
You can see the WSDL of our API by visiting this address: https://ws.nuconomy.com/v0.6/ReportsGenerator.asmx?wsdl. -
Call one of the API methods
Choose the method API call you wish to run. Each method API call represents a report in the system. Additionally, each method API call accepts a different object, representing all the specific report parameters.
-
Run the report and parse the results
Finally, simply call the desired report and pass all the necessary parameters. Each method API call will return a different object, representing the data of the specific report. If the anticipated results are very large, the results will be sent and structured as an array.
Code Examples
Click on the following links to find code examples for using the NuConomy SOAP API:
- .NET C# - Retrieving reports using NuConomy SOAP API. Code VS2008 Solution
Activity Statistics Report
Method Name: ExecuteActivityStatisticsReportPurpose: Retrieving all the activities that occurred in your site during a specific time frame.
Parameters Object: ActivityStatisticsReportBuilder
Mandatory Parameters:
FromToStart - The start of the time frame run the report on.
FromToEnd - The end of the time frame run the report on.
Measure - The measure to run the report on (Events/Unique Users/Visits)
Result Object: ActivityStatisticsReportRow[]
Result Attributes: ID - The ID of the returned activity
Name - The name of the returned activity
Value - The value of the returned activity
Change - The change in the value of the activity compared to the previews time frame
Which Referrers contribute the most Report
Method Name: ExecuteSiteActivityByReferrersReportPurpose: Retrieving the contribution of different referrers to your site
Parameters Object: SiteActivityByReferrersReportBuilder
Mandatory Parameters:
FromToStart - The start of the time frame run the report on.
FromToEnd - The end of the time frame run the report on.
Measure - The measure to run the report on (Events/Unique Users/Visits)
ActivityId - The activity you want to query for
Result Object: SiteActivityByReferrersReportRow[]
Result Attributes:
Referrer - The name of the returned referrer Value - The amount of the queried activity this referrer contributed to your site
What's my top content report
Method Name: ExecuteContentByActivityReportPurpose: Retrieving a list of top content by activity
Parameters Object: ContentByActivityReportBuilder
Mandatory Parameters:
FromToStart - The start of the time frame run the report on.
FromToEnd - The end of the time frame run the report on.
Measure - The measure to run the report on (Events/Unique Users/Visits)
ActivityId - The activity you want to query for
Result Object: ContentByActivityReportRow[]
Result Attributes:
ContentId - The id for the returned content Content - The URL of the returned content Title - The title of the returned content Value - The amount of the specified activity that was tracked for this content
Which search terms make my site tick Report
Method Name: ExecuteExternalSearchTermsReportPurpose: Retrieving a list of the top contributing external search terms by activity
Parameters Object: ExternalSearchTermsReportBuilder
Mandatory Parameters:
FromToStart - The start of the time frame run the report on.
FromToEnd - The end of the time frame run the report on.
Measure - The measure to run the report on (Events/Unique Users/Visits)
ActivityId - The activity you want to query for
Result Object: ExternalSearchTermsReportRow[]
Result Attributes:
Term - The returned search term Value - The amount of contribution of the search term for the queried activity
