WordPress plugin
Put your giveaway banner, streak widget and perk toast on any WordPress page with a shortcode, and count LearnDash lessons as streaks.
Install
- Download the plugin. In WordPress, open Plugins → Add plugin → Upload plugin, upload the ZIP and activate it.
- For the streak widget or perk toast, copy your project key from Settings in Perkadoo. In WordPress, paste it into Settings → General → Perkadoo project key and save.
- Add a shortcode to any page, post or widget area. In the block editor, use the Shortcode block.
The giveaway banner needs no project key.
Shortcodes
| Shortcode | Widget | Attributes |
|---|---|---|
[perkadoo_giveaway slug="your-giveaway"] | Giveaway banner | slug (required), variant (card by default, bar or pill), position |
[perkadoo_streak] | Streak widget | action (visit by default), position |
[perkadoo_perk] | Perk toast | action (visit by default), position |
slug is the last part of your giveaway's /g/ link. position takes the same values as each widget's data-position.
Share is built into the banner and the toast, so it needs no shortcode.
LearnDash lessons
- In Perkadoo setup, choose WordPress and copy the connection code. It works once and expires after 10 minutes.
- In WordPress, paste it into Settings → General → Perkadoo LearnDash streak and save. The field shows the program it connected to.
- Add
[perkadoo_streak]to your course page or a sidebar.
Every lesson a signed-in student finishes counts once toward their streak, in any course. Signed-in students see their own lesson streak in [perkadoo_streak], and visitors who aren't signed in see a visit streak.
WordPress sends each finished lesson from your server after the page loads, so students never wait on Perkadoo. Failed sends retry for about an hour. WP-Cron runs on site traffic, so set up a server cron on quiet sites.
Members are identified by a random ID the plugin derives on your site. Their WordPress user ID, name and email never leave it.
How it works
Each shortcode renders the widget's element and loads https://cdn.perkadoo.com/v1/widget.js once, deferred in the footer. Pages without a Perkadoo shortcode load nothing.
Without a LearnDash connection, the streak widget counts check-ins from the visitor's browser with a random visitor ID, so it suits visit streaks. Other actions your server counts with the webhook or an incoming URL need the member's identity on the page. Use the widget script with data-member or data-user-hash for those.
The perk toast celebrates each perk. Coupon codes and claim links show only on pages that pass a signed identity token, which this plugin doesn't create. See Connecting users.
The widget's "Made with Perkadoo" credit stays off in WordPress.
Removing it
Deactivating the plugin removes the widgets from your pages and stops counting lessons. Deleting it also deletes the project key and the LearnDash connection.