KickFire API for Google Integration

Tealium Expert
Tealium Expert

HI All

I am currently implementing the kickfire for google integration. 

In essence the script carries out to Kickfire API calls, one of whcih returns a json from which the dimensions can be extracted and mapped. 

Has anyone done this piece of wotk previously? 

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -
5 REPLIES 5

KickFire API for Google Integration

Tealium Expert
Tealium Expert

OK, so gettign the API calls to work was easy. 

The code was added to an extention set as a pre-loader, then loading the json values into utag.data variables. 

$.getJSON('//api.kickfire.com/gip',function(kfip) { 
		  $.getJSON('//api.kickfire.com/v2/company:(all)?ip='+kfip+'&key=-blank-',function(obj) {         
		    utag.data['kf_name'] = obj['data'][0]['name'];
		    utag.data['kf_website'] = obj['data'][0]['website']; 

The variables show population in utag inspector. However when mapped to GA dimensions or say to push into another variable, the process as undefined. 

Not sure what i am missing.... 

Should i be declaring the utag vars differently?

 

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

KickFire API for Google Integration

Tealium Employee

Hi @GavinAttard

I will continue working with you on this via the support ticket you have open.

Once we have reached a solution I'll make sure we share it here for the benefit of other customers.

Nathan Fleming
Senior Customer Support Engineer - EMEA, Tealium

KickFire API for Google Integration

Tealium Expert
Tealium Expert

Hi Folks

So, Thanks to @nathan_fleming it was confirmed that the issue the kick fire variables where not beign passed to GA was due to a race condition. 

The solution to this was to create another extention that generated a utag.link event tied specfically to the GA tag UID. A delay of one second was also put on the utag.link function so as to ensure the api call was complete and the variables populated. 

So, kickfire API calls as Pre-loader, then a second extention like the below.

setTimeout(function(){utag.link({
  ga_event_action : "cd_upload",
  ga_event_category : "data_load",
  ga_event_label : "non_interactive",
  ga_non_interaction : true,
  kf_name : utag_data['kf_name'],
  kf_employees : utag_data['kf_employees'],
  kf_revenue : utag_data['kf_revenue'],
  kf_sic_code : utag_data['kf_sic_code'],
  kf_naics_code : utag_data['kf_naics_code']
},
function() { utag.DB("Firing KickFire event"); },
[15]

Not sure if this is the best way to deal with this, so open to any other suggestions on how to best handle this. 

Gavin

Research your Experience | Improve and Evolve | Leave no one behind
- Don't forget to mark a solution as accepted if it hits the mark -

KickFire API for Google Integration

Tealium Employee

Hi @GavinAttard

Thanks for following up with the solution.

Hopefully we'll have other users who can share if they are doing this in any other ways.

Nathan Fleming
Senior Customer Support Engineer - EMEA, Tealium

KickFire API for Google Integration

Employee Emeritus

Great solution @GavinAttard. Thank you for sharing!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Public