1.0.11 • Published 2 years ago

@nacelle/nacelle-littledata-nuxt-module v1.0.11

Weekly downloads
124
License
ISC
Repository
-
Last release
2 years ago

DEPRECATED

This package is deprecated. To integrate a third party script with your Nuxt project, follow our docs here: https://docs.getnacelle.com/nuxt/external-scripts.html

Nacelle Littledata Nuxt Module

Integrate Littledata in your Nacelle Nuxt Starter project

nacelle-littledata-nuxt-module

This plugin makes it easier to add the Google Analytics client ID to checkout attributes, as documented in step 4 of Littledata's headless setup guide.

Prerequisites

Add Module to Nacelle

Once you have Nacelle, Google Analytics and Littledata set up you can install this module in your project from npm:

npm install @nacelle/nacelle-littledata-nuxt-module --save

In nuxt.config.js, add @nacelle/nacelle-littledata-nuxt-module to the modules array:

modules: [
  // ...other modules,
  '@nacelle/nacelle-littledata-nuxt-module'
],

Finally, use the $getLittledataMetafield function to add the Google Analytics client ID to $nacelle.checkout.process:

const processCheckoutObject = await this.$nacelle.checkout.process({
  cartItems: getters.checkoutLineItems,
  checkoutId: getters.checkoutIdForBackend,
  metafields: [await this.$getLittledataMetafield()],
});
1.0.11

2 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago