The sa()
method lets you dynamically change a report suite at any time on the page. If you want to send data to different report suites without a page reload, you can use this method.
The Web SDK operates by sending data to a specific Datastream, which forwards data to the desired Analytics Report Suite(s). A single Datastream can forward data to multiple Report Suites. This section applies to both the Web SDK extension and manually implementing the Web SDK.
The Web SDK extension provides a Datastream drop-down list for each environment. Alternatively, you can manually enter the Datastream ID.
Set the datastreamId
configuration variable to the Datastream ID. The Datastream ID is found on the right when viewing a Datastream in Adobe Experience Platform Data Collection.
alloy("configure", {
datastreamId: "example-a01f-4458-8cec-ef61de241c93",
orgId: "ADB3LETTERSANDNUMBERS@AdobeOrg"
});
See Configure the Web SDK in the Web SDK documentation for more information.
There is not a flexible way to change report suite in the interface. You can set report suite under the Library Management accordion when configuring the Adobe Analytics extension. However, you cannot change or update the report suite using rules. If you want to update report suite values after they are set, use the custom code editor following AppMeasurement syntax.
Call the s.sa()
method to change the destination report suite. Its only argument is a string containing a report suite ID, or multiple report suite IDs delimited by a comma. The report suite ID argument is required. Do not use spaces in the string argument.
s.sa("examplersid");
For example, you can change the report suite if the user takes a specific action on your site.
// Instantiate the tracking object
var s = s_gi("examplersid");
// If the visitor plays a video, you can add a video report suite
s.sa("examplersid,videorsid");
// Then send an image request
s.t();