简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM