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: https://docs.getnacelle.com/nuxt/external-scripts.html

@nacelle/nacelle-littledata-nuxt-module

1.0.11 • Public • Published

[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()],
});

Readme

Keywords

none

Package Sidebar

Install

npm i @nacelle/nacelle-littledata-nuxt-module

Weekly Downloads

0

Version

1.0.11

License

ISC

Unpacked Size

3.87 kB

Total Files

4

Last publish

Collaborators

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