This package has been deprecated

Author message:

This package is deprecated. To integrate a third party script with your Nuxt project, follow our docs here:


1.0.3 • Public • Published


This package is deprecated. To integrate a third party script with your Nuxt project, follow our docs here:

Nacelle Nuxt Module

Easily integrate loyalty rewards program into your Nacelle Nuxt project.


  • A Nacelle project set up locally. See for getting started.
  • A account and installed on your Shopify store.


Add Module to Nacelle

Once you hace Nacelle and Smile set up you can install this module in your project from npm:

npm install @nacelle/ --save

After the package has installed, open nuxt.config.js. Under modules add @nacelle/ to the array:

modules: [
  // other modules,

Next, the SMILE_API_KEY (Public) and SMILE_SECRET (Private) to the project's .env file.


We'll pass the environment variables to the module by adding a new smile object with key and secret properties to the nacelle block of nuxt.config.js:

nacelle: [
  // other nacelle config,
  smile: {
    key: process.env.SMILE_API_KEY,
    secret: process.env.SMILE_SECRET,

To make the Smile widget visible in your store, open up layouts/default.vue and paste <smile-widget /> just before the closing div in the template:

<div class="app nacelle">
  <!-- <other-elements /> -->
  <smile-widget />

Shopify Setup

If using the Shopify Hosted Solution for Accounts, then follow the additional steps below.

Otherwise, if using the Integrated Account Solution or any other method, you can just pass the customer object into the SmileWidget component as props like this:

<smile-widget :customer="customer" />

To complete the integration a liquid snippet needs to be added to your Shopify theme.

Open your Shopify theme code editor under "Actions > Edit Code". Under "Snippets" click "Add new snippet". Name the snippet smile-init.liquid, paste the following code, and save:

{% if customer %}
  {% assign smile_api_secret = shop.metafields['smile'].api_secret %}
  {% assign smile_customer_id = %}
  {% assign smile_digest = smile_customer_id
    | append: smile_api_secret
    | md5 %}

  if (window.Cookies) {
    var smileUser = {
      customerId: {{ smile_customer_id | json }},
      digest: {{ smile_digest | json }}

    Cookies.set('nacelle_smile_user', JSON.stringify(smileUser), {expires: 30});

{% endif %}

Open theme.liquid and and before the closing body tag paste {% include 'smile-init' %}. Your Shopify account pages will now set the correct smile data to be used in your Nacelle store.




Package Sidebar


Weekly Downloads






Unpacked Size

9.61 kB

Total Files


Last publish


  • dave.king.nacelle
  • nacelle-support
  • jeffrichie
  • darrik-moberg
  • stuckya
  • badiolaignacio
  • dzouras
  • andrew-nacelle
  • nwrichmond
  • brianvanderson
  • cbodtorf
  • krisq
  • curbol
  • irnoble
  • jongeyer
  • nacelle-bot