0
votes

I see multiple scopes on Shopify API likes write_themes or write_script_tags to add content in differents files of the theme.
I would like to create an app to add a marketing pixel in differents pages like checkout, index or add_to_cart.

I will need to add a script like :

<script>
...PixelCode...
init('API_KEY', VIEW)
</script>

I will need to set the API_KEY variable dynamique and editable from the panel of the app.

What is the best scope and way to do that ?

Thank you in advance.

1

1 Answers

0
votes

Have your App installed in the merchant shop. They approve your App to add script tags. Next up, have your App install the needed script tags. Finally, profit from your hard work.

As for the scopes, writing a script tag only requires that scope. You are not modifying the merchant's theme, so you do not need that scope.