I am getting multiple network calls that are growing at an exponential rate

Bronze Contributor
Bronze Contributor

I have a custom code that tracks steps when a user goes through each field of a form. It is designed to capture the element clicked on, map the name of the element to an eVar in adobe, then record a success event. The problem is that on the first form field, there are 2 network calls. On the second, there are 4 network calls. on and on exponentially growing.

 

By the time i am QAing the last field, there have been over 500 network calls sent for a simple piece of form tracking code. None of my evars are even being recorded in the network calls. I have even disabled the mapping in tealium, and it is still sending adobe calls.

What is going on? Is there something going on in the source code of the page that is causing a bug?

var clickedItem = jQuery('.formField1.required.needsclick, #message, input, .form-field2.required.needsclick ').on("click", function(event) {
	if (this.id !== '') {
		utag.link({
			"utag.data.event_type": "form_click",
			"utag.data.form_field": this.id
		})
	} else {
		if (jQuery(this).hasClass('xxxxx')) {
			utag.link({
				"utag.data.event_type": "form_click",
				"utag.data.form_field": "form-field1"
			})
		} else {
			utag.link({
				"utag.data.event_type": "form_click",
				"utag.data.form_field": "form-field2"
			})
		}
	}
}})

Picture5.png

 

1 REPLY 1

I am getting multiple network calls that are growing at an exponential rate

Tealium Employee
Sorry to hear you are having issues here.

It sounds like the event listener is being added multiple times, which would probably be the result of this extension firing on each view/link event being sent.
Can you confirm this is running at the "DOM Ready" Scope, or has "run once" selected if it is "Before / After Load Rules"?

If its BLR / ALR without the "run once" option, each view would be adding the listener again - which would mean firing another event.

Page load - 1 listener
Click - 1 event fired + 1 listener added
2nd click - 2 events fires, +2 listeners added

Etc. etc.
Public