Skip to content

Instantly share code, notes, and snippets.

View maucherOnline's full-sized avatar

maucherOnline

View GitHub Profile
@maucherOnline
maucherOnline / get-revenues.php
Last active March 3, 2023 14:31
Get revenues from freemius API
<?php
// Freemius PHP SDK needs to be installed
require_once dirname(__FILE__) . '/freemius/Freemius.php';
// Set credentials
define( 'FS__API_SCOPE', 'developer' );
define( 'FS__API_DEV_ID', 00000 );
define( 'FS__API_PUBLIC_KEY', 'pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' );
define( 'FS__API_SECRET_KEY', 'sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' );
@maucherOnline
maucherOnline / freemius-google-analytics.js
Last active March 1, 2023 12:44
Include Google Analytics tracking in freemius checkout
<script src="https://checkout.freemius.com/checkout.min.js"></script>
<script>
var handler = FS.Checkout.configure({
plugin_id: 'xxxxx',
plan_id: 'xxxxx',
public_key: 'pk_yyyyyyyyyyyyyyyyyy',
image: 'https://yyy.com/Logo-SVG.svg'
});
jQuery('.purchase, a[href*="#purchase"').on('click', function (e) {