user6566313 user6566313 - 4 months ago 19
HTML Question

Can I use Body Labs' Blue in my Shopify page?

I'm currently prototyping Blue, and I already have a Shopify page for my company. Is there a way to use both together to have Blue in my Shopify page?

Answer

Possibly!

You can embed the Blue widget into your Shopify page by modifying your HTML/CSS code and inserting the widget code into your theme.

In the documentation (http://developer.bodylabs.com/blue_reference.html) this would be step 6. However, we are currently updating this step, so it should really look like the following:

<script>
    window.addEventListener('load', function(){
        Blue.mount(document.getElementById('bodyLabsBlueWidget'),
        {
            accessKey: "myKey", // from your API account
            debug: false,
            action: {
                onFinished: function (finalMeasurements) {
                    console.log(finalMeasurements)
               },
           },
       });
    });
</script>

After this, you will need to also build out your front and back end code to collect the measurements after Blue is unmounted and associate them with the customer. Although embedding Blue into a Shopify page is fairly straightforward, it does require a system to be built out around it.

Comments