Profit Button mobile web repository
JavaScript PHP HTML CSS
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cdn
custom_include
example/bootstrap
joomla
jsdelivr
libs
vmetro
wordpress-plugin/profit-button
.gitignore
README.md
hpmd_code.js
iframe.html
iframe.js
includepb.min.js
jquery.pep.js
load2.png
load3.png
pool.js
probtn.js
showinparent.js
showinparent.php
stats_probtn_send.js
style.css
ua-parser.js

README.md

ProfitBtn

Gitter

How to use ProfitBtn jQuery plugin

  1. Sign up to admin.probtn.com
  2. Register your app: create new application, select it's platform (web) and BundleID (domain where button would be used)
  3. Choose the site to promote in your application.
  4. Integrate ProButton with your site using the following instructions:

How to add button to your site

If you have jQuery at your site, add code

<script>
$(document).ready(function() { 
        $.getScript('//cdn.probtn.com/probtn.js', function () {
             $(document).StartButton({'mainStyleCss':'//cdn.probtn.com/style.css'});
        });
});
</script>

If don't or you don't know, you can add (for example before </body>) (without async call of this script):

<script src="//cdn.probtn.com/includepb.min.js"></script>

And thats all.

Demo sites

Demo mode

If button code is added to site, but you didn't create campaign at admin.probtn.com or disable it, you can check button adding

#probtnDebug 

to url

Used libraries

FAQ

Q: What if I don't want that on every page on my site?

A: You can manually add code

jQuery(document).StartButton({});

only on nessesary pages. And if you use Joomla module, you can set in settings nessesary menu items, where button would be shown.

Q: Or what if I want different ones on different pages?

A: Then you can manually override button settings. For example:

jQuery(document).StartButton({
        "mainStyleCss": "//cdn.probtn.com/style.css",
        "ContentURL": "http://example.com"
    });

Will ovveride ContentURL param and on button click would be opened fancybox with http://example.com site.

Q: Or what if I want several on one page?

A: Such option isn't available at current version (case several buttons on one page will case some conflicts).

Documentation

More documentation about button could be found at wiki - https://github.com/probtn/probtn-web/wiki/Button-documentation

Wordpress example:

ScreenShot