Custom Javascript code to send non-pageview image request s.tl() sending as pageview
I have a use case where I cannot use the usual method of collecting custom event data via Adobe Data Collection which is creating a rule then setting action as Adobe Analytics - Set Variables, then Send Beacon then Clear Variables. I need to tightly control what data is sent with the hit to Adobe. In Data Collection the rule fires. My main issue is with the Action in the rule, which is set to Custom Code. To control the data I want to send to AA, I'm using Javascript to set a few variables then send the data via s.tl() method. The issue is that when the call is sent it's sent as a page view. In the Experience Platform Debugger, isPageView is true on the hit. It should be false; it should be a s.tl() with the link type being "o" (custom link). This is the code. What needs to be changed to make it a non-pageview hit? Btw all the vars I'm setting and sending are fine and being collected, the only issue is the hit being a page view.
<script src="AppMeasurement.js"></script>
<script>
// Instantiate the Analytics tracking object with report suite ID
var s_account = "myreportsuiteid";
var s=s_gi(s_account);
// Make sure data is sent to the correct location
s.trackingServer = "my.trackingserver.com";
//Assign all vars we need to collect
s.pageName = page_name;
s.eVar1 = location.pathname.split("/").slice(-1)[0];
s.eVar2 = document.location.href;
s.events = "event32";
// Send hit to Adobe
s.tl();
</script>