Yes. You can send events to two different level 1 sites from the same page. The recommended approach depends on the library you use:
-
Piano Analytics SDK: Send events with a per-event override using the
onBeforeBuildfunction.
SDK Piano Analytics
You can send two events to two different sites from the same page with the Piano Analytics SDK and the onBeforeBuild function.
This method allow you to specify a specific sending configuration for the event.
In the example below, we are sending two clicks events to two different sites from the same button.
function(){
pa.sendEvent('click.action', {
'click' :'click name',
'click_chapter1' :'chapter 1',
'click_chapter2' :'chapter 2',
'click_chapter3' :'chapter 3'
});
pa.sendEvent('click.action', {
'click' :'click name',
'click_chapter1' :'chapter 1',
'click_chapter2' :'chapter 2',
'click_chapter3' :'chapter 3'
},{
onBeforeBuild:function (PianoAnalytics, model, next) {
model.setConfiguration('site','1234');
model.setConfiguration('collectDomain', 'https://logsXXX.xiti.com');
next();
}});}