Closed tomikaka22 closed 2 years ago
The problem is that you're saving the response of the .record
function in the instance var, not the instance itself. Try to save the instance first and then call the record and action function separately.
const instance = ackeeTracker.create('https://ackee.my.domain', {
detailed: true
})
instance.record('2f322116-45h7-481c-1477-542f42e92061')
instance.action('5j899334-9l3c-43h1-944a-fdd6701f8231', { key: 'Click', value: 1 })
🐞 Describe the bug
When I try to track an event with Ackee, it fails with "TypeError: instance.action is not a function" error.
📚 To Reproduce
If the user accepts detailed tracking I set a local storage item. Here is my code:
💡 Expected behavior
Ackee adds 1 click to the event I've set up.
⚙️ Environment
📋 Additional context
Love the app btw!