You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can only call .load on page load, or reload (refresh). If you modify the .load method between page loads, it doesn’t have any effect until the page is reloaded.
I've been working on a Figma plugin. My plugin code runs in an iframe provided by the Figma web app. That iframe doesn't run any of my code until after its page has already loaded.
Segment hasn't received any tracking events which I generate in the Figma plugin. I think this is because my .load call is being queued until the next page refresh, and any .track calls are being queued until at least one .load call completes.
Is there a workaround for this problem?
The text was updated successfully, but these errors were encountered:
I assume there's some mechanism that figma plugins have that passes the analytics instance from the parent frame to the iframe? Best would be instantiate analytics within the iframe.
There's a lot to debug here -- if you aren't able to generate any segment events no matter what, I would assume there's some other error (make sure, in devtools, you're looking at the iframe console and not the js console). Make sure you're using the latest version the snippet as well.
Unfortunately, there's no one size fits all approach here.
I would recommending either having the snippet load completely within the iframe, or, if you're just looking to send a few basic segment events using fetch and can manage the user ID/anonId yourself, use the basic http api:
From the documentation:
I've been working on a Figma plugin. My plugin code runs in an iframe provided by the Figma web app. That iframe doesn't run any of my code until after its page has already loaded.
Segment hasn't received any tracking events which I generate in the Figma plugin. I think this is because my
.load
call is being queued until the next page refresh, and any.track
calls are being queued until at least one.load
call completes.Is there a workaround for this problem?
The text was updated successfully, but these errors were encountered: