gridaco / assistant

🤖 Bring your Figma design & development pipeline to the next level - with design to code, in-design-content-management, component management, tools for faster design
https://grida.co/assistant
Other
578 stars 47 forks source link

Analytics won't work on figma due to cookie / indexdb block on figma iframe #74

Closed softmarshmallow closed 3 years ago

softmarshmallow commented 3 years ago

Supporting GA seems like a possible feature looking at a "Rename It" Plugin. bridged assistant analytics wont work on figma

Approaches

References

Working branch

softmarshmallow commented 3 years ago

Update - need research image

https://github.com/basiclines/figma-super-tidy/blob/master/src/utils/Tracking.js https://github.com/basiclines/figma-super-tidy/blob/master/src/Core.js#L123

https://figmaplugins.slack.com/archives/CHPTY6TFD/p1613083318167400

softmarshmallow commented 3 years ago

Using Measurement api seems to be like a approach.

https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag#send_an_event

Could not make it work. cannot find information about what app_instance_id was. (cannot retrieve it from web)

via gtag api won't work either.

softmarshmallow commented 3 years ago

Found the solution i think.

https://ga-dev-tools.appspot.com/ga4-event-builder/

here, we can test the analytics4. which app instance id was not required.

image

Also tested with firebase app id image

softmarshmallow commented 3 years ago

Done by hosting the plugin to web.

myflashlab commented 2 years ago

Seems like specifying app_instance_id is mandatory. Am I missing something?

Screenshot 2022-05-12 at 09 07 34
softmarshmallow commented 2 years ago

At some point. I gave up this approach having analytics directly in figma plugin iframe. Instead, i hosted the plugin ui as a general website with external url with indexeddb, + (other apis available) which is best for using existing analytics services without any unexpectations ;)