Business::SiteCatalyst - Interface to Adobe Omniture SiteCatalyst's REST API.
Version 1.2.2
This module allows you to interact with Adobe (formerly Omniture) SiteCatalyst, a web analytics service. It encapsulates all the communications with the API provided by Adobe SiteCatalyst to offer a Perl interface for managing reports, pulling company-specific SiteCatalyst data (ex: token usage), uploading SAINT data (feature not implemented yet), etc.
Please note that you will need to have purchased the Adobe SiteCatalyst product, and have web services enabled within your account first in order to obtain a web services shared secret, as well as agree with the Terms and Conditions for using the API.
NOTE: the 'api_subdomain' option/config variable is utilized for the api url. To determine your specific API URL/Endpoint, please visit https://developer.omniture.com/en_US/get-started/api-explorer Most users won't need to set this variable unless the default causes errors.
API URL: 'https://' . $api_subdomain . '.omniture.com/admin/1.3/rest/?'
use Business::SiteCatalyst; # Create an object to communicate with Adobe SiteCatalyst my $site_catalyst = Business::SiteCatalyst->new( username => 'dummyusername', shared_secret => 'dummysecret', api_subdomain => 'api|api2', #optional; default value='api' );
Create a new Adobe SiteCatalyst object that will be used as the interface with Adobe SiteCatalyst's API
Creates a new object to communicate with Adobe SiteCatalyst.
'username' and 'shared_secret' are mandatory. The 'verbose' parameter is optional and defaults to not verbose.
Create a new Business::SiteCatalyst::Report object, which will allow retrieval of SiteCatalyst reports.
# Create a new report my $report = $site_catalyst->instantiate_report( type => 'report type', report_suite_id => 'report suite id', ); # Act on an existing report my $report = $site_catalyst->instantiate_report( report_id => 'report id', );
Parameters:
type
The type of the report to instantiate. Acceptable values are 'Overtime', 'Ranked', and 'Trended'.
report_suite_id
The Report Suite ID you want to pull data from.
report_id
The id of the existing report you want to check status of, retrieve results for, or cancel processing.
Create a new Business::SiteCatalyst::Company object, which will allow retrieval of company-specific SiteCatalyst data.
my $company = $site_catalyst->instantiate_company();
Parameters: none
Internal, formats the JSON call with the arguments provided and checks the reply.
my ( $error, $response_data ) = $site_catalyst->send_request( method => $method, data => $data, );
Control the verbosity of the debugging output.
$site_catalyst->verbose( 1 ); # turn on verbose information
$site_catalyst->verbose( 0 ); # quiet!
warn 'Verbose' if $site_catalyst->verbose(); # getter-style
By default, only basic tests that do not require a connection to Adobe SiteCatalyst's platform are run in t/.
To run the developer tests, you will need to do the following:
Request access to Adobe web services from your Adobe Online Marketing Suite administrator.
In Adobe SiteCatalyst's interface, you will need to log in as an admin, then go to the "Admin" tab, "Admin Console > Company > Web Services". There you can find your "shared secret" for your username.
Your report suite IDs can be found in Adobe SiteCatalyst's interface. Visit "Admin > Admin Console > Report Suites".
You can now create a file named SiteCatalystConfig.pm in your own directory, with the following content:
package Adobe SiteCatalystConfig; sub new { return { username => 'username', shared_secret => 'shared_secret', report_suite_id => 'report_suite_id', api_subdomain => 'api|api2', #optional. default='api' verbose => 0, # Enable this for debugging output }; } 1;
You will then be able to run all the tests included in this distribution, after adding the path to Adobe SiteCatalystConfig.pm to your library paths.
Jennifer Pinkham, <jpinkham at cpan.org>.
<jpinkham at cpan.org>
Please report any bugs or feature requests to bug-Business-SiteCatalyst at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Business-SiteCatalyst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Business-SiteCatalyst at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Business::SiteCatalyst
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-SiteCatalyst
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Business-SiteCatalyst
CPAN Ratings
http://cpanratings.perl.org/d/Business-SiteCatalyst
Search CPAN
http://search.cpan.org/dist/Business-SiteCatalyst/
Thanks to ThinkGeek (http://www.thinkgeek.com/) and its corporate overlords at Geeknet (http://www.geek.net/), for footing the bill while I write code for them! Special thanks for technical help from fellow ThinkGeek CPAN author Guillaume Aubert http://search.cpan.org/~aubertg/
Copyright 2013 Jennifer Pinkham.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Business::SiteCatalyst, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::SiteCatalyst
CPAN shell
perl -MCPAN -e shell install Business::SiteCatalyst
For more information on module installation, please visit the detailed CPAN module installation guide.