Skip to content

Commit

Permalink
⚡ (wp) Add UTM auto forward
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jun 15, 2023
1 parent 4223485 commit a64e621
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/embeds/wordpress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typebot.io/wordpress",
"version": "3.1.10",
"version": "3.1.11",
"main": "index.js",
"repository": "https://github.com/baptisteArno/typebot.io",
"author": "baptisteArno",
Expand All @@ -11,7 +11,7 @@
},
"scripts": {
"deploy": "pnpm copy && pnpm commit",
"copy": "svn copy ./trunk ./tags/3.1.10",
"commit": "svn ci -m 'Fix custom variable host'"
"copy": "svn copy ./trunk ./tags/3.1.11",
"commit": "svn ci -m 'Auto forward UTMs'"
}
}
5 changes: 4 additions & 1 deletion packages/embeds/wordpress/trunk/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires at least: 5.0
Tested up to: 6.0
License: GPL 2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Stable Tag: 3.1.10
Stable Tag: 3.1.11

== Description ==
Collect 4x more responses with conversational apps using Typebot.
Expand All @@ -24,6 +24,9 @@ This plugin relies on Typebot which is a tool that allows you to create conversa
3. Activate your Typebot with the "Typebot" admin button located in the sidebar

== Changelog ==
= 3.1.11 =
* Automatically forward UTMs for standard embed

= 3.1.10 =
* Fix custom apiHost variable name

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public function add_typebot_container($attributes = [])
$bot_initializer = '<script type="module">
import Typebot from "' . $lib_url . '"
Typebot.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", typebot: "' . $typebot . '", prefilledVariables: { ...window.typebotWpUser } });</script>';
const urlParams = new URLSearchParams(window.location.search);
const queryParams = Object.fromEntries(urlParams.entries());
Typebot.initStandard({ apiHost: "' . $api_host . '", id: "' . $id . '", typebot: "' . $typebot . '", prefilledVariables: { ...window.typebotWpUser, ...queryParams } });</script>';

return '<typebot-standard id="' . $id . '" style="width: ' . $width . '; height: ' . $height . ';"></typebot-standard>' . $bot_initializer;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/embeds/wordpress/trunk/typebot.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Plugin Name: Typebot
* Description: Convert more with conversational forms
* Version: 3.1.10
* Version: 3.1.11
* Author: Typebot
* Author URI: http://typebot.io/
* License: GPL-2.0+
Expand All @@ -16,7 +16,7 @@
die();
}

define('TYPEBOT_VERSION', '3.1.10');
define('TYPEBOT_VERSION', '3.1.11');

function activate_typebot()
{
Expand Down

0 comments on commit a64e621

Please sign in to comment.