Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

_satellite.track() and passing related information

stevew79063868
Level 2
Level 2

The Launch documentation suggests that the _satellite.track() function can be used to pass along extra information in the syntax:

_satellite.track('contact_submit', { name: 'John Doe' });

However when I access this detail object using %event.detail%, the element is resolved as "[object Object]"

Have I done something wrong or is this an error in the documentation?

1 Accepted Solution
atusingh
Correct answer by
Employee
Employee

Can you try using %event.detail.name% to access the detail passed in _satellite.track() function ?

View solution in original post

3 Replies
atusingh
Correct answer by
Employee
Employee

Can you try using %event.detail.name% to access the detail passed in _satellite.track() function ?

View solution in original post

gflare
Level 4
Level 4

As AtulSingh mentioned above, you're getting [object Object] because the result is not a single string value, but rather an Object = { name: 'John Doe' }

If you want to get the value 'John Doe' , you can use %event.detail.name% to retrieve the value of name.