Code Monkey home page Code Monkey logo

fs-mautic-hooks's Introduction

fs-mautic-hooks is a webhook receiver for Freemius that will update Mautic contacts on specified webhook events.

This is intended to be used with the fs-mautic-sync initial sync script to set up the custom fields in Mautic and do an initial sync of the plugin users.

This script is formatted as a Google App Engine app but could be adapted to work on different serverless platforms (or just a good ole lamp server). Feel free to fork.

Features

  • Uses secure Mautic oAuth2 authentication
  • Creates or updates Mautic contacts and companies when:
    • A new plugin user is created
    • The plugin is installed on a new site
    • The plugin is deactivated/uninstalled
    • The plugin plan is changed
    • The user opts in/out of the beta program
    • The user opts in/out of marketing emails
    • The user is accepted as an affiliate
    • The PHP, WordPress or plugin version are updated

Requirements

Installation & usage

  1. Clone the repository
  2. Create a new config.php file in the root directory based on config.sample.php
  3. Modify the app.yaml to suit your needs
  4. Run gcloud app deploy to deploy the app to Google App Engine
  5. Navigate to https://path-to-your-app-engine-app.appspot.com/authorize to initialize the oAuth flow
  6. Add a new webhook in Freemius, pointing to https://path-to-your-app-engine-app.appspot.com/?token=the-token-you-defined-in-config.php

Troubleshooting

  • Try clearing the Mautic cache if the API is giving you issues

fs-mautic-hooks's People

Stargazers

Rihards Mantejs avatar Uriahs Victor avatar Emmanuel A. avatar Dario Curvino avatar Agung Sundoro avatar  avatar

Watchers

 avatar Koen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.