This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BRAND_NAME = 'Lorem Ipsum' | |
export function gtmProduct(product, variant) { | |
return { | |
name: product.title, | |
id: variant.sku, | |
price: parseFloat(variant.price), | |
variant: variant.title, | |
brand: BRAND_NAME, | |
category: 'All', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------ | |
Libraries | |
------------------------*/ | |
const axios = require("axios"); | |
const fs = require("fs"); | |
const FormData = require("form-data"); | |
/*------------------------ | |
Download the file. | |
Good article on how to download a file and send with form data - https://maximorlov.com/send-a-file-with-axios-in-nodejs/ |
OlderNewer