Tech specs - the buttonizer

Permalink

As simple as a link

As said on the “Introduction to CryptoWiz” section, when you get the code for a button from the Invocation Code Generator, you’re given a raw URL that looks like this:

https://blockchainfinancial.com/crypto_wiz/buttonizer/public_key/button_id

That URL is converted into a button on all the CryptoWiz Enabled Websites by the buttonizer script, taking in consideration all the button settings and any override you specify from the source code.

Requirements

The buttonizer requires jQuery to work. If it isn’t present on the host website, it will be included accordingly.

Invoking the buttonizer

In order to get the buttonizer working, you must include the next <script> tag on the <head> of the page. You may call it at the end, before closing the <body> tag if you prefer:

<script type="text/javascript" src="https://blockchainfinancial.com/crypto_wiz/controller/test-website"></script>

Then it will look for all <a> tags inside the document and convert them automatically.

For every button being rendered, the buttonizer makes a JSONP call to a script on our API asking for counter and/or table data if the button is set to display it.

The per-coin counters

When you don’t hide the button counters from the button settings, our button data deliverer will send the per-coin totals. Depending on the button targeting settings, you may get different amounts, for instance:

  • If your button doesn’t have an item_id set, you will get separate counters for every page where the button is embedded.
  • If your button has an item_id set, the same counters will be displayed everywhere.
  • If your button has target_data specified (coins are going to an account different than yours), the counters will focus on the item_id + target_data.

The button’s data table

When your button type is set to a table, the buttonizer will grab the latest transactions the button received and display them accordingly. All the transactions being shown are also filtered, so they will match the counters.

You should check the use case examples section to see how to deal with different item identifiers and retargeting transactions.

Further reading

 Parameters reference

Tech Specs index

Use cases

Analytics

Go back to the manual index