Help
 Print
How to install FROGED in Shopify?

1. Within your Shopify dashboard, click on Online Store.

                                                           

2. Click on themes.

                                               

3. Click on the Actions button and choose Edit Code.

                                               


4. Under layout, select theme.liquid.

                     


5. Paste your Froged Code just after the </head> tag.

                       

  • This is the code to paste, replacing "Your Workspace ID" with yours which you can find in Settings - Workspace Info:
<!-- Start Froged -->
  <script>
    window.frogedSettings = {
      appId: "Your Workspace ID"
    }
  </script>
  <script>
    (function(){var a=document,b=window;if("function"!=typeof Froged){Froged=function(a,b,c){Froged.c(a,b,c)},Froged.q=[],Froged.c=function(a,b,c){Froged.q.push([a,b,c])},fg_data={hooks:{}};var c=function(){var b=a.createElement("script");b.type="text/javascript",b.async=!0,b.src="https://sdk.froged.com";var c=a.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)};"complete"===a.readyState?c():window.attachEvent?b.attachEvent("onload",c):b.addEventListener("load",c,!1)}})()
  </script>


{% if customer %}
<script>
var orders_id='';
var last_order_id='';
var last_order_number='';
var orders_count= 0;
</script>
{% for order in customer.orders %}
   <script>
if(orders_count === 0){
last_order_id = '{{order.id}}';
last_order_number = '{{order.order_number}}';
}
orders_id =  orders_id + '{{order.id}}' + ',';
orders_count = orders_count + 1;

   </script>
{% endfor %}
<script>
Froged('set', {
    userId: '{{customer.id}}',
    email: '{{customer.email}}',
    name: '{{customer.first_name}}' + ' ' + '{{customer.last_name}}',
firstname: '{{customer.first_name}}',
lastname: '{{customer.last_name}}',
phone: '{{customer.phone}}',
last_order_id: last_order_id,
orders_count: orders_count,
last_order_number:  last_order_number,
orders: orders_id,
newsletter: '{{customer.accepts_marketing}}'
});  
</script>
{% endif %}

<!-- End Froged -->

6. In addition, you must add the following attributes in FROGED, inside Contact Attributes section:


7. Click SAVE and that's it! 


Was this article helpful?
FROGED Help Center | 2024