Skip to content

Instantly share code, notes, and snippets.

View marcfowler's full-sized avatar

Marc Fowler marcfowler

View GitHub Profile
@marcfowler
marcfowler / Bump.js
Last active May 4, 2017 01:17
ThriveCart: Help: Facebook Pixel code
<script>fbq('track', 'Purchase', {value: _thrive_order.order.bump.total_readable, currency: _thrive_order.order.currency});</script>
@marcfowler
marcfowler / Bump.js
Last active August 15, 2020 12:27
ThriveCart: Help: Google Analytics Ecommerce code
<script>
(function() {
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': _thrive_order.order.id,
'revenue': _thrive_order.order.total,
'tax': _thrive_order.order.tax,
'currency': _thrive_order.order.currency
});
@marcfowler
marcfowler / gist:220ed63a0a1658ea382d
Last active June 5, 2019 22:22
ThriveCart Webhook Parameters
event: string (order.success)
thrivecart_account: string (Your account's subdomain)
thrivecart_secret: string (Your account's 'secret word' parameter)
base_product: int (The ID of the front-end product this order relates to)
order_id: int (Unique order ID)
currency: string (Uppercase, 3-character currency code - USD, GBP, etc)
customer_id: int (Customer ID)
customer_identifier: string (Customer identifier from your payment processor - may be null)
customer: array (name, firstname, lastname, email, address)
order: array:
@marcfowler
marcfowler / example.html
Created January 15, 2016 14:30
ThriveCart: Help: Advanced: Custom HTML to trigger modal cart
<ul>
<li>Bullet point #1</li>
<li>Bullet point #2...</li>
<li class="thrivecart-button" data-thrivecart-account="[your subdomain]" data-thrivecart-product="1">Click here to buy!</li>
</ul>
<script async src="//thrivecart.com/embed/v1/thrivecart.js"></script>