17 | <%= theme.excerpt_link %> 18 |
19 | <% } %> 20 | <% } else { %> 21 | <%- post.content %> 22 | <% } %> 23 |├── .distignore ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── checks.yml │ ├── release.yml │ └── tests.yml ├── .gitignore ├── .wordpress-org ├── banner-1544x500.png ├── banner-772x250.png ├── banner.psd ├── icon-128x128.png ├── icon-256x256.png ├── icon.svg ├── screenshot-1.gif ├── screenshot-2.gif ├── screenshot-3.jpg ├── screenshot-4.jpg └── screenshot-5.jpg ├── README.md ├── README.txt ├── ab-testing-for-wp.php ├── babel.config.js ├── blog ├── .gitignore ├── README.md ├── _config.production.yml ├── _config.yml ├── package-lock.json ├── package.json ├── scaffolds │ ├── draft.md │ ├── page.md │ └── post.md ├── source │ ├── 404.md │ ├── _posts │ │ ├── add-tests-anywhere-on-your-site.md │ │ ├── add-tests-anywhere-on-your-site │ │ │ ├── screenshot-1.png │ │ │ └── screenshot-2.png │ │ ├── convert-blocks-to-tests.md │ │ ├── convert-blocks-to-tests │ │ │ └── convert-to-test.png │ │ ├── features-so-far-planning-ahead.md │ │ ├── features-so-far-planning-ahead │ │ │ ├── example.jpg │ │ │ ├── screenshot-1.jpg │ │ │ └── screenshot-2.jpg │ │ ├── form-integrations.md │ │ ├── form-integrations │ │ │ └── html-forms-integration.jpg │ │ ├── new-form-integrations.md │ │ ├── place-visitors-variant-using-url-parameters.md │ │ ├── place-visitors-variant-using-url-parameters │ │ │ └── ab-test-conditions.png │ │ ├── track-outbound-links.md │ │ └── track-outbound-links │ │ │ └── screenshot.png │ └── favicon.ico └── themes │ └── ab-testing-for-wp │ ├── _config.yml │ ├── layout │ ├── archive.ejs │ ├── index.ejs │ ├── layout.ejs │ ├── page.ejs │ ├── partials │ │ ├── article.ejs │ │ ├── footer.ejs │ │ ├── head.ejs │ │ ├── header.ejs │ │ ├── page.ejs │ │ └── post │ │ │ ├── date.ejs │ │ │ └── title.ejs │ └── post.ejs │ └── source │ ├── css │ ├── _article.scss │ ├── _footer.scss │ ├── _frontpage.scss │ ├── _header.scss │ ├── _reset.scss │ ├── _variables.scss │ └── style.scss │ ├── images │ ├── campaign-tweaking.svg │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── financial-analysis.svg │ ├── icon-light.svg │ ├── icon.svg │ ├── integrations.jpg │ ├── market-research.svg │ ├── monitor.svg │ ├── og_abtestingforwp_poster.jpg │ ├── screenshot-1.gif │ ├── screenshot-2.gif │ ├── screenshot-3.jpg │ ├── seo-report.svg │ ├── web-development.svg │ └── web-protection.svg │ └── integrations.psd ├── composer.json ├── cypress.json ├── cypress ├── data │ ├── wordpress_e2e_2020-01-17.sql │ └── wordpress_e2e_2020-04-06.sql ├── integration │ ├── ab-testing.spec.ts │ ├── admin-bar.spec.ts │ ├── how-to.spec.ts │ ├── onboarding.spec.ts │ ├── outbound.spec.ts │ ├── overview.spec.ts │ ├── plugin-activation.spec.ts │ ├── stand-alone.spec.ts │ └── test-results.spec.ts ├── plugins │ └── index.js ├── support │ ├── commands.ts │ ├── index.ts │ └── patches.ts └── types │ └── index.d.ts ├── docker-compose-e2e.yml ├── docker-compose.yml ├── package-lock.json ├── package.json ├── scripts ├── bump.sh └── release.sh ├── src ├── assets │ ├── ab-testing-for-wp-base64-logo.svg │ ├── ab-testing-for-wp-logo-icon.svg │ ├── ab-testing-for-wp-logo-square.eps │ ├── ab-testing-for-wp-logo.svg │ ├── how-to-1.png │ ├── how-to-2.png │ ├── how-to-3.png │ ├── how-to-4.png │ └── plugin-gutenberg-demo.gif ├── css │ ├── admin-bar.css │ └── admin.css ├── js │ ├── admin-bar.tsx │ ├── admin-editor.ts │ ├── admin-page.tsx │ ├── blocks │ │ ├── ab-test-inserter.tsx │ │ ├── ab-test-variant.tsx │ │ └── ab-test.tsx │ ├── components │ │ ├── Admin │ │ │ ├── Admin.tsx │ │ │ ├── components │ │ │ │ └── Table │ │ │ │ │ └── Table.tsx │ │ │ └── pages │ │ │ │ └── Overview │ │ │ │ ├── Overview.css │ │ │ │ └── Overview.tsx │ │ ├── AdminBar │ │ │ ├── AdminBar.tsx │ │ │ ├── Test.tsx │ │ │ ├── Variant.tsx │ │ │ └── helpers │ │ │ │ └── highlight.ts │ │ ├── BoxShadow │ │ │ ├── BoxShadow.css │ │ │ └── BoxShadow.tsx │ │ ├── GeneralSettings │ │ │ ├── GeneralSettings.css │ │ │ └── GeneralSettings.tsx │ │ ├── GoalSelector │ │ │ └── GoalSelector.tsx │ │ ├── Inserter │ │ │ ├── Inserter.css │ │ │ └── Inserter.tsx │ │ ├── Loader │ │ │ └── Loader.tsx │ │ ├── Logo │ │ │ └── Logo.tsx │ │ ├── Onboarding │ │ │ ├── Arrow.tsx │ │ │ ├── Onboarding.css │ │ │ ├── Onboarding.tsx │ │ │ └── Overlay.tsx │ │ ├── Significance │ │ │ ├── Significance.css │ │ │ └── Significance.tsx │ │ ├── TestPreview │ │ │ ├── EditWrapper.css │ │ │ ├── EditWrapper.tsx │ │ │ └── TestPreview.tsx │ │ ├── TestResults │ │ │ ├── DeclareWinner.tsx │ │ │ ├── TestResults.css │ │ │ └── TestResults.tsx │ │ ├── VariantSelector │ │ │ ├── VariantSelector.css │ │ │ └── VariantSelector.tsx │ │ └── VariantSettings │ │ │ ├── Conditionals.css │ │ │ ├── Conditionals.tsx │ │ │ ├── ControlSettings.tsx │ │ │ ├── DistributionSettings.tsx │ │ │ ├── VariantSettings.css │ │ │ └── VariantSettings.tsx │ ├── core │ │ └── allowedBlockTypes.ts │ ├── frontend.ts │ ├── frontend │ │ ├── doNotTrack.ts │ │ ├── handleTestRender.ts │ │ └── handleTestTracking.ts │ ├── helpers │ │ ├── calcTestWinner.ts │ │ ├── options.ts │ │ └── wordpress.ts │ ├── plugins │ │ └── ConvertButton │ │ │ └── ConvertButton.tsx │ └── types │ │ └── ab-testing-for-wp.d.ts └── php │ ├── actions │ ├── goals.php │ ├── options.php │ ├── posts.php │ └── tests.php │ ├── data │ ├── ab-test-manager.php │ ├── ab-test-stats.php │ ├── ab-test-tracking.php │ ├── installer.php │ └── options-manager.php │ ├── helpers │ ├── ab-test-content-parser.php │ ├── block-renderer.php │ ├── cookie-manager.php │ └── do-not-track.php │ ├── integrations │ ├── Integration.php │ ├── bootstrap.php │ ├── contact-form-7 │ │ └── ContactForm7.php │ ├── formidable │ │ └── Formidable.php │ ├── gravityforms │ │ └── GravityForms.php │ ├── html-forms │ │ └── HTMLForms.php │ ├── mc4wp │ │ └── MC4WP.php │ ├── ninja-forms │ │ └── NinjaForms.php │ └── wpforms │ │ └── WPForms.php │ ├── pages │ ├── advanced.php │ └── howto.php │ └── registrations │ ├── register-admin-page.php │ ├── register-custom-post-type.php │ ├── register-frontend-admin-bar.php │ ├── register-gutenberg-blocks.php │ ├── register-render-scripts.php │ ├── register-rest.php │ └── register-shortcode.php ├── tsconfig.json └── webpack.config.js /.distignore: -------------------------------------------------------------------------------- 1 | /.git 2 | /.github 3 | /.idea 4 | /.wordpress-org 5 | /cypress 6 | /node_modules 7 | /blog 8 | /wp-content 9 | /wp-content-e2e 10 | *.DS_Store 11 | ab-testing-for-wp.zip 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.json] 12 | indent_size = 4 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | 17 | [*.html] 18 | indent_size = 4 19 | 20 | [*.php] 21 | indent_size = 4 -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | wp-content/ 4 | wp-content-e2e/ 5 | cypress/**/*.js 6 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | extends: [ 4 | 'airbnb', 5 | 'plugin:@typescript-eslint/recommended', 6 | 'plugin:cypress/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | plugins: ['@typescript-eslint', 'cypress', 'react-hooks'], 10 | env: { 11 | browser: true, 12 | node: true, 13 | 'cypress/globals': true, 14 | }, 15 | globals: { 16 | wp: false, 17 | ABTestingForWP: false, 18 | ABTestingForWP_AdminBar: false, 19 | ABTestingForWP_Options: false, 20 | ABTestingForWP_Data: false, 21 | }, 22 | rules: { 23 | '@typescript-eslint/camelcase': 0, 24 | 'cypress/no-unnecessary-waiting': 0, 25 | 'react/jsx-props-no-spreading': 0, 26 | 'react/prop-types': 0, 27 | 'react/require-default-props': 0, 28 | 'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }], 29 | 'import/extensions': [ 30 | 'error', 31 | 'ignorePackages', 32 | { 33 | js: 'never', 34 | jsx: 'never', 35 | ts: 'never', 36 | tsx: 'never', 37 | } 38 | ], 39 | }, 40 | settings: { 41 | 'import/resolver': { 42 | node: { 43 | extensions: ['.js', '.jsx', '.ts', '.tsx'], 44 | }, 45 | }, 46 | }, 47 | }; 48 | -------------------------------------------------------------------------------- /.github/workflows/checks.yml: -------------------------------------------------------------------------------- 1 | name: Checks 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | check: 7 | name: Check source 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@v1 12 | - name: Use Node.js 13 | uses: actions/setup-node@v1 14 | - name: Install 15 | run: npm ci 16 | - name: Lint 17 | run: npm run lint 18 | - name: Check TypeScript 19 | run: npm run tsc 20 | - name: Build 21 | run: npm run build 22 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | release: 10 | name: Release plugin 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@master 15 | - name: Use Node.js 16 | uses: actions/setup-node@v1 17 | - name: Use Composer 18 | uses: MilesChou/composer-action/5.6/install@master 19 | with: 20 | args: dumpautoload 21 | - name: Build project 22 | run: | 23 | npm ci 24 | npm run clean-build 25 | - name: WordPress Plugin Deploy 26 | uses: 10up/action-wordpress-plugin-deploy@master 27 | env: 28 | SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} 29 | SVN_USERNAME: ${{ secrets.SVN_USERNAME }} 30 | SLUG: ab-testing-for-wp 31 | - name: Archive project 32 | run: npm run archive 33 | - name: Create Release on GitHub 34 | id: create_release 35 | uses: actions/create-release@v1.0.0 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | with: 39 | tag_name: ${{ github.ref }} 40 | release_name: Release ${{ github.ref }} 41 | draft: false 42 | prerelease: false 43 | - name: Upload Release Asset to GitHub 44 | id: upload-release-asset 45 | uses: actions/upload-release-asset@v1.0.1 46 | env: 47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 48 | with: 49 | upload_url: ${{ steps.create_release.outputs.upload_url }} 50 | asset_path: ./ab-testing-for-wp.zip 51 | asset_name: ab-testing-for-wp.zip 52 | asset_content_type: application/zip 53 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | test: 7 | name: E2E tests 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout code 11 | uses: actions/checkout@master 12 | - name: Use Node.js 13 | uses: actions/setup-node@v1 14 | - name: Use Composer 15 | uses: MilesChou/composer-action/5.6/install@master 16 | with: 17 | args: dumpautoload 18 | - name: Install 19 | run: npm ci 20 | - name: Build 21 | run: npm run clean-build 22 | - name: Setup environments 23 | run: npm run e2e:setup-env 24 | - name: Test 25 | run: npm run e2e:run -- --record=${{ secrets.CYPRESS_RECORD }} 26 | env: 27 | CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cypress/videos/ 2 | cypress/screenshots/ 3 | dist/ 4 | node_modules/ 5 | vendor/ 6 | wp-content/ 7 | wp-content-e2e/ 8 | ab-testing-for-wp.zip 9 | stats.json 10 | -------------------------------------------------------------------------------- /.wordpress-org/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/banner-1544x500.png -------------------------------------------------------------------------------- /.wordpress-org/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/banner-772x250.png -------------------------------------------------------------------------------- /.wordpress-org/banner.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/banner.psd -------------------------------------------------------------------------------- /.wordpress-org/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/icon-128x128.png -------------------------------------------------------------------------------- /.wordpress-org/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/icon-256x256.png -------------------------------------------------------------------------------- /.wordpress-org/icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /.wordpress-org/screenshot-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/screenshot-1.gif -------------------------------------------------------------------------------- /.wordpress-org/screenshot-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/screenshot-2.gif -------------------------------------------------------------------------------- /.wordpress-org/screenshot-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/screenshot-3.jpg -------------------------------------------------------------------------------- /.wordpress-org/screenshot-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/screenshot-4.jpg -------------------------------------------------------------------------------- /.wordpress-org/screenshot-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/.wordpress-org/screenshot-5.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A/B Testing for WordPress 2 | 3 | WordPress plugin which allow you to run A/B tests from anywhere within your content. 4 | 5 | Utilize the new Gutenberg editor to create split tests to serve to your visitors and find out 6 | which variation works best. 7 | 8 |  9 | 10 | ## Installing 11 | 12 | 1. Download `ab-testing-for-wp.zip` found on the [latest release](https://github.com/Gaya/ab-testing-for-wp/releases/latest) 13 | 1. Unzip contents and upload "ab-testing-for-wp" folder to the "/wp-content/plugins/" directory. 14 | 1. Activate the plugin through the "Plugins" screen in WordPress. 15 | 1. You can now add tests to your content! 16 | 17 | ## Requirements 18 | 19 | - At least WordPress 5.0 (uses the new Gutenberg editor) 20 | 21 | ## JavaScript Bundle Development 22 | 23 | Requirements: [Node.js](https://nodejs.org/en/) 24 | 25 | Clone the project and `npm install`. 26 | 27 | Use the following commands: 28 | 29 | ``` 30 | # one time build 31 | npm run build 32 | 33 | # development watch mode for JavaScript 34 | npm run dev 35 | 36 | # prepare for release (clean, build, archive) 37 | npm run release 38 | ``` 39 | 40 | ## Using Docker for development 41 | 42 | Requirements: [Composer](https://getcomposer.org/), [Docker](https://www.docker.com/products/developer-tools) 43 | 44 | ``` 45 | # Starting Docker container: 46 | docker-compose up -d 47 | ``` 48 | 49 | Development WordPress install now runs at [localhost:8000](http://localhost:8000) 50 | 51 | `./wp-content` of the project root is synced with the development install's `wp-content`. 52 | 53 | Look at `docker-compose.yml` for database passwords. 54 | 55 | ## Testing and linting 56 | 57 | This project is tested using [Cypress](https://www.cypress.io/) and linted using [eslint](https://eslint.org/). These dependencies get installed with the project automatically. 58 | 59 | ### ESLint 60 | 61 | Linting makes sure the code style is in order. This will also be performed on the main repository when creating a pull request. 62 | 63 | In order to run linting on your local environment run the following command from the root of the project: 64 | 65 | ``` 66 | npm run lint 67 | ``` 68 | 69 | ### Cypress 70 | 71 | Running all end-to-end tests makes sure all functionality is still in place after updates to the code have been made. 72 | 73 | Run all tests by entering the following command: 74 | 75 | ``` 76 | npm run test 77 | ``` 78 | 79 | There are a few extra command to help you test and develop locally: 80 | 81 | ``` 82 | # run local test environment and open Cypress 83 | npm run test:dev 84 | 85 | # tear down the setup environment and create a new one 86 | npmr run e2e:setup-env 87 | 88 | # reset the database to be a fresh WordPress install 89 | npm run e2e:reset-db 90 | ``` 91 | 92 | 93 | -------------------------------------------------------------------------------- /ab-testing-for-wp.php: -------------------------------------------------------------------------------- 1 | . 26 | */ 27 | 28 | namespace ABTestingForWP; 29 | 30 | if (!defined('ABSPATH')) { 31 | header('Status: 403 Forbidden'); 32 | header('HTTP/1.1 403 Forbidden'); 33 | exit; 34 | } 35 | 36 | require __DIR__ . '/vendor/autoload.php'; 37 | 38 | function bootstrap() { 39 | // on every request 40 | new RegisterGutenbergBlocks(__FILE__); 41 | new RegisterCustomPostType(); 42 | new RegisterShortcode(); 43 | new BootStrapIntegrations(); 44 | 45 | // only on admin 46 | if(is_admin()) { 47 | if(!defined('DOING_AJAX') || !DOING_AJAX) { 48 | new RegisterAdminPage(__FILE__); 49 | } 50 | } 51 | 52 | // only on frontend 53 | if(!is_admin()) { 54 | new RegisterRenderScripts(__FILE__); 55 | new RegisterFrontendAdminBar(__FILE__); 56 | } 57 | } 58 | 59 | function bootstrapREST() { 60 | new RegisterREST(); 61 | } 62 | 63 | // register WordPress hooks 64 | new Installer(__FILE__); 65 | bootstrap(); 66 | add_action('rest_api_init', 'ABTestingForWP\\bootstrapREST'); 67 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@babel/preset-env', 4 | '@babel/preset-typescript', 5 | ], 6 | plugins: [ 7 | [ 8 | '@babel/plugin-transform-react-jsx', 9 | { 10 | pragma: 'wp.element.createElement', 11 | pragmaFrag: 'wp.element.Fragment', 12 | }, 13 | ], 14 | '@babel/plugin-proposal-class-properties', 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /blog/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | node_modules/ 6 | public/ 7 | .deploy*/ 8 | _multiconfig.yml 9 | -------------------------------------------------------------------------------- /blog/README.md: -------------------------------------------------------------------------------- 1 | # A/B Testing for WordPress blog 2 | 3 | Source of the [A/B Testing for WordPress](https://abtestingforwp.com/blog/) website and blog. 4 | 5 | Uses [Hexo](https://hexo.io) to generate site and blog. 6 | 7 | ## Useful commands 8 | 9 | ```bash 10 | # develop 11 | npm run serve 12 | 13 | # build 14 | npm run build 15 | ``` 16 | -------------------------------------------------------------------------------- /blog/_config.production.yml: -------------------------------------------------------------------------------- 1 | # Hexo Configuration 2 | 3 | # URL 4 | url: https://abtestingforwp.com 5 | root: __ROOT_URL__/ 6 | -------------------------------------------------------------------------------- /blog/_config.yml: -------------------------------------------------------------------------------- 1 | # Hexo Configuration 2 | ## Docs: https://hexo.io/docs/configuration.html 3 | ## Source: https://github.com/hexojs/hexo/ 4 | 5 | # Site 6 | title: A/B Testing for WordPress 7 | subtitle: Easiest way to create split tests on your WordPress sites, right from the content editor! 8 | description: WordPress plugin to create A/B and split tests right from your content editor 9 | keywords: A/B testing, marketing, split test, optimise, measure, WordPress 10 | author: CleverNode 11 | language: en-UK 12 | timezone: CET 13 | 14 | # URL 15 | ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' 16 | url: http://localhost:4000/ 17 | root: / 18 | permalink: blog/:title/ 19 | permalink_defaults: 20 | 21 | # Directory 22 | source_dir: source 23 | public_dir: public 24 | tag_dir: tags 25 | archive_dir: blog 26 | category_dir: categories 27 | code_dir: downloads/code 28 | i18n_dir: :lang 29 | skip_render: 30 | 31 | # Writing 32 | new_post_name: :title.md # File name of new posts 33 | default_layout: post 34 | titlecase: false # Transform title into titlecase 35 | external_link: true # Open external links in new tab 36 | filename_case: 0 37 | render_drafts: false 38 | post_asset_folder: true 39 | relative_link: false 40 | future: true 41 | highlight: 42 | enable: true 43 | line_number: true 44 | auto_detect: false 45 | tab_replace: 46 | 47 | # Home page setting 48 | # path: Root path for your blogs index page. (default = '') 49 | # per_page: Posts displayed per page. (0 = disable pagination) 50 | # order_by: Posts order. (Order by date descending by default) 51 | index_generator: 52 | path: '' 53 | per_page: 10 54 | order_by: -date 55 | 56 | # Category & Tag 57 | default_category: uncategorized 58 | category_map: 59 | tag_map: 60 | 61 | # Date / Time format 62 | ## Hexo uses Moment.js to parse and display date 63 | ## You can customize the date format as defined in 64 | ## http://momentjs.com/docs/#/displaying/format/ 65 | date_format: MMMM Do, YYYY 66 | time_format: HH:mm:ss 67 | 68 | # Pagination 69 | ## Set per_page to 0 to disable pagination 70 | per_page: 10 71 | pagination_dir: page 72 | 73 | # Extensions 74 | ## Plugins: https://hexo.io/plugins/ 75 | ## Themes: https://hexo.io/themes/ 76 | theme: ab-testing-for-wp 77 | 78 | # Deployment 79 | ## Docs: https://hexo.io/docs/deployment.html 80 | deploy: 81 | type: 82 | -------------------------------------------------------------------------------- /blog/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-site", 3 | "version": "0.0.0", 4 | "private": true, 5 | "hexo": { 6 | "version": "4.2.1" 7 | }, 8 | "scripts": { 9 | "serve": "hexo server", 10 | "build": "npm run generate && npm run replace", 11 | "generate": "hexo generate --config _config.yml,_config.production.yml", 12 | "replace": "replace-in-file /__ROOT_URL__/g 'https://abtestingforwp.com' public/*.html,public/**/*.html,public/**/**/*.html --isRegex" 13 | }, 14 | "dependencies": { 15 | "hexo": "^4.2.0", 16 | "hexo-browsersync": "^0.3.0", 17 | "hexo-generator-archive": "^1.0.0", 18 | "hexo-generator-category": "^1.0.0", 19 | "hexo-generator-index": "^1.0.0", 20 | "hexo-generator-tag": "^1.0.0", 21 | "hexo-renderer-ejs": "^1.0.0", 22 | "hexo-renderer-marked": "^2.0.0", 23 | "hexo-renderer-sass": "^0.4.0", 24 | "hexo-renderer-stylus": "^1.1.0", 25 | "hexo-server": "^1.0.0", 26 | "replace-in-file": "^5.0.2" 27 | } 28 | } -------------------------------------------------------------------------------- /blog/scaffolds/draft.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | tags: 4 | --- 5 | -------------------------------------------------------------------------------- /blog/scaffolds/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | --- 5 | -------------------------------------------------------------------------------- /blog/scaffolds/post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | description: 5 | --- 6 | -------------------------------------------------------------------------------- /blog/source/404.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Whoops! Not found 3 | --- 4 | We're really sorry, but it looks like the link you wanted to visit is not available. 5 | 6 | [Return to the homepage](/) 7 | -------------------------------------------------------------------------------- /blog/source/_posts/add-tests-anywhere-on-your-site.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Add Tests Anywhere on Your Site 3 | date: 2019-04-19 16:00:00 4 | description: Create stand-alone A/B tests to add anywhere on your WordPress site 5 | --- 6 | In the latest version of [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/) it is possible to add new tests outside of the regular content editor way. 7 | 8 | {% asset_img screenshot-1.png Creating a stand-alone test %} 9 | 10 | ## Stand-alone Tests 11 | 12 | You can create a new stand-alone test from the admin sidebar or by choosing "Add New" on the tests overview page. 13 | 14 | These tests will be available through a shortcode, which can be used anywhere on your site. 15 | 16 | Make sure you "publish" the stand-alone test and toggle the "Run this test" setting in the general settings to make it available. 17 | 18 | ## Using in Your Theme / Template 19 | 20 | You can place the shortcode of the test anywhere in your theme's PHP code, this means you can for instance place your tests in the header or footer of your site. 21 | Not only in the content anymore! 22 | 23 | Place the following code anywhere in your theme: 24 | 25 |
<?php echo do_shortcode("[ab-test id=1234]"); ?>
26 |
27 | Replace "1234" with the number visible in the sidebar while editing a stand-alone test. You can also find this number in the A/B tests overview.
28 |
29 | ## Using Stand-alone Tests in Regular Content
30 |
31 | When you have stand-alone tests ready and published, you can also add them to your post and page content through the content editor.
32 |
33 | {% asset_img screenshot-2.png Inserting a stand-alone test %}
34 |
35 | Insert an A/B test like you would normally. It gives you the choice to create a new test in the content or insert an existing test.
36 |
37 | Pick the test you want to insert, confirm your choice, and a preview of your test will be visible in the content editor.
38 |
39 | To edit the stand-alone test: click on the "edit test" button which appears when hovering over the test.
40 |
41 | ## Tests as a Custom Post Type
42 |
43 | In technical terms, stand-alone tests are so called "custom post types" which can be interacted with by other WordPress developers and makes A/B Testing for WordPress a lot more customizable.
44 |
--------------------------------------------------------------------------------
/blog/source/_posts/add-tests-anywhere-on-your-site/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/add-tests-anywhere-on-your-site/screenshot-1.png
--------------------------------------------------------------------------------
/blog/source/_posts/add-tests-anywhere-on-your-site/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/add-tests-anywhere-on-your-site/screenshot-2.png
--------------------------------------------------------------------------------
/blog/source/_posts/convert-blocks-to-tests.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Convert Gutenberg Content Blocks to A/B Tests
3 | date: 2019-08-15 16:00:00
4 | description: How to convert your existing content blocks into A/B tests with A/B Testing for WordPress
5 | ---
6 | It is now possible to convert your existing content blocks into an A/B test.
7 |
8 | This way you can easily experiment with the content block you've already put on your pages!
9 |
10 | You do not have to create the same block two times to put inside of tests anymore, design your blocks upfront and convert them into a test to have duplications over two variants.
11 |
12 | Find this addition in the latest version of [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/).
13 |
14 | ## How to Convert Blocks Into Tests
15 |
16 | {% asset_img convert-to-test.png Convert a content block to a test %}
17 |
18 | 1. In the content editor, find the content block you want to convert into a test, and select it.
19 | 2. Press "more options" (1. in figure).
20 | 3. Choose "Convert to A/B test" (2. in figure).
21 |
22 | This will convert the block into an A/B test placing a copy of the block in both the A and B variants.
23 |
24 | Do not forget to enable the test to run it.
25 |
26 | It is not possible to convert blocks inside of an existing A/B Test to an A/B test.
27 |
--------------------------------------------------------------------------------
/blog/source/_posts/convert-blocks-to-tests/convert-to-test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/convert-blocks-to-tests/convert-to-test.png
--------------------------------------------------------------------------------
/blog/source/_posts/features-so-far-planning-ahead.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Features so Far, and Planning Ahead
3 | date: 2019-04-02
4 | description: A/B Testing for WordPress features during the first weeks, and what's ahead for the plugin.
5 | ---
6 |
7 | About two weeks ago the first version of [A/B Testing for WordPress](/) was released.
8 |
9 | The response so far has been really good and I am looking forward to bringing the plugin to a higher level quickly.
10 |
11 | The plugin is [available for download on WordPress.org](https://wordpress.org/plugins/ab-testing-for-wp/) and can be found in the plugins directory.
12 |
13 | ## Features so Far
14 |
15 | Because the plugin is in a very early stage, the feature set might look a bit bare bones, but it's already pretty powerful!
16 |
17 | ### Create A/B (split) Tests in the Content Editor
18 |
19 | The main feature of A/B Testing for WordPress right now is the ability to create tests right in the content editor of WordPress.
20 |
21 | You can add a test, define the content of the variants in the test (A and B), and adjust the options, all in one place.
22 |
23 | {% asset_img screenshot-1.jpg Creating tests in the content editor %}
24 |
25 | ### Safe for SEO
26 |
27 | The standard, or control, variant of your test will always show to search engines and caching layers. This way the original content of your site will always stay the same for search engine and crawler bots.
28 |
29 | ### Measure the Results
30 |
31 | When visitors are presented with one of the variants they will partake in the test, once they visit (convert) the goal you want to measure they will end up in the "conversions" count.
32 |
33 | {% asset_img screenshot-2.jpg Test results %}
34 |
35 | You can see the winning variant as it has the highest percentage of conversions.
36 |
37 | At the moment you can setup posts and pages as goals for a test.
38 |
39 | ### Preview Variants on Your Site
40 |
41 | You can preview the variants of a test on your website by toggling between variants in the "admin bar".
42 |
43 | WordPress adds a bar at the top of your website for easy access to admin functionality. Here you can switch between variants of a test to see the result it produces.
44 |
45 | ### Declaring a Winner
46 |
47 | When you feel like the test has had enough time and there is a clear winner, you can declare a winner by going to the test options in the content editor.
48 |
49 | Pick a winner, and the contents of the variant will be "broken free" of the test. The test will also be removed from the page to make room for the winning variant.
50 |
51 | ## Planning Ahead
52 |
53 | There is a lot I want to include in the plugin, and that will take time to implement and develop. For now there is a rough plan for features which are most likely to be implemented first.
54 |
55 | ### Split Testing Pages
56 |
57 | When you do a split test, you might also want to test the complete content of a page. So you will be able to serve different landing pages to groups of people for instance.
58 |
59 | ### Integrate with E-commerce
60 |
61 | It would be valuable to be able to track what helps converting people to buy your products.
62 |
63 | Think about optimising the sales and decrease cart abandonment through performing tests.
64 |
65 | ### Variations based on segments
66 |
67 | A feature which has been requested a few times is to have variants based on segments. Meaning you can show different variations of a test to people visiting from a certain location or using a certain device.
68 |
69 | ### More variants than A and B
70 |
71 | Right now, you can add A and B variants, but have more than two different variants would be cool too!
72 |
73 | ## Get in Touch
74 |
75 | If you have any questions, or if you have suggestions about features you miss / would like to see improved, do not hesitate to [contact me through info@abtestingforwp.com](mailto:info@abtestingforwp.com).
76 |
--------------------------------------------------------------------------------
/blog/source/_posts/features-so-far-planning-ahead/example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/features-so-far-planning-ahead/example.jpg
--------------------------------------------------------------------------------
/blog/source/_posts/features-so-far-planning-ahead/screenshot-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/features-so-far-planning-ahead/screenshot-1.jpg
--------------------------------------------------------------------------------
/blog/source/_posts/features-so-far-planning-ahead/screenshot-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/features-so-far-planning-ahead/screenshot-2.jpg
--------------------------------------------------------------------------------
/blog/source/_posts/form-integrations.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Form Plugin Integrations
3 | date: 2019-04-04 10:59:38
4 | description: Use form submits and sign ups as a goal to track for A/B Testing for WordPress
5 | ---
6 | [The latest version (1.6.0) of A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/) now supports choosing form actions as a goal to track!
7 |
8 | Keep track of form submissions and see which variant of your content converts the most visitors to interact with your forms.
9 |
10 | ## Track Sign Ups and Submissions
11 |
12 | You can track form submissions and sign ups. This allows you to test which variant of your content drives the most visitors to engage with your forms.
13 |
14 | {% asset_img html-forms-integration.jpg HTML Forms integration %}
15 |
16 | ## Integrations so Far
17 |
18 | As of now, A/B Testing for WordPress integrates with [Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/), [HTML Forms](https://wordpress.org/plugins/html-forms/), and [Contact Form 7](https://wordpress.org/plugins/contact-form-7/).
19 |
20 | ## More to Come
21 |
22 | Other popular form plugins will be added soon. As their structure does not match A/B Testing for WordPress right now, it will need some more work to allow these plugins to be integrated.
23 |
24 | Gravity Forms, Formidable Forms, and Ninja Forms are planned to be implemented soon.
25 |
26 | ## How to Use
27 |
28 | Edit the page of the test you want to use with the integrated plugin.
29 |
30 | In the test settings, under "Testing Goal", select the plugin from the "Type" options dropdown.
31 |
32 | Now pick the form you want to set a a goal.
33 |
34 | Save / Update the post and you're all set!
35 |
36 | ## Update to Start Using
37 |
38 | Update your installed version of [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/) and start using these form integrations right now!
39 |
--------------------------------------------------------------------------------
/blog/source/_posts/form-integrations/html-forms-integration.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/form-integrations/html-forms-integration.jpg
--------------------------------------------------------------------------------
/blog/source/_posts/new-form-integrations.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: New Form Plugin Integrations
3 | date: 2019-04-09 10:00:00
4 | description: Added form plugin integrations for Ninja Forms, Formidable, Gravity Forms, and WPForms.
5 | ---
6 | Just a quick update on the form integrations: just added [WPForms](https://wordpress.org/plugins/wpforms-lite/), Gravity Forms, [Ninja Forms](https://wordpress.org/plugins/ninja-forms/), and [Formidable](https://wordpress.org/plugins/formidable/), as integrations.
7 |
8 | If you have any one of these plugins installed, you can pick your forms as a tracking goal for your test.
9 |
10 | ## Update to Start Using
11 |
12 | Update your installed version of [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/) and start using these new form integrations right now
13 |
--------------------------------------------------------------------------------
/blog/source/_posts/place-visitors-variant-using-url-parameters.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Place Visitors in a Variant using URL Parameters
3 | date: 2020-02-13 20:00:00
4 | description: Through conditions, force a visitor to be placed in a variant of your test.
5 | ---
6 |
7 | A reoccurring feature request I got was the ability to place visitors in a predetermined variant of a test through the use of query parameters in the URL.
8 |
9 | This feature is great if you want to be able to have control over the variant of a test the visitor is placed in.
10 |
11 | This feature is now available in [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/).
12 |
13 | {% asset_img ab-test-conditions.png Setup variant conditions for A/B tests %}
14 |
15 | ## Placing visitors in a variant
16 |
17 | When you go to a test's settings you'll find a new option to add conditions under variants.
18 |
19 | Choose "add condition to A" to add a condition for variant A. Enter the key and value pair you want to force visitor into this variant.
20 |
21 | Key value pairs look like this in the URL of a page: `?key=value&another=thing`. Also known as query parameters.
22 |
23 | Once a visitor lands on a page with your test and has the key value pair in their URL, they will be placed in said variant.
24 |
25 | ## Integrates well with analytics and other marketing tools
26 |
27 | For your convenience `utm_source`, `utm_medium`, and `utm_campaign` are added to be quickly added as conditions.
28 |
29 | This way you can for instance show your newsletter readers a certain variant of a test _and_ also keep track of it in your analytics tool by using `utm_source=newsletter` as a condition.
30 |
31 | ## Upgrade now
32 |
33 | [Update A/B Testing for WordPress to 1.17.0](https://wordpress.org/plugins/ab-testing-for-wp/) to get this new feature.
34 |
--------------------------------------------------------------------------------
/blog/source/_posts/place-visitors-variant-using-url-parameters/ab-test-conditions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/place-visitors-variant-using-url-parameters/ab-test-conditions.png
--------------------------------------------------------------------------------
/blog/source/_posts/track-outbound-links.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Track Outbound Links
3 | date: 2020-01-27 14:00:00
4 | description: Track outbound links as a goal in A/B tests in WordPress
5 | ---
6 | From now on you can track **outbound links** in A/B Testing for WordPress.
7 |
8 | Now you're not bound to just pages and posts, but can also track if the user goes to a specific link.
9 |
10 | Find this addition in the latest version of [A/B Testing for WordPress](https://wordpress.org/plugins/ab-testing-for-wp/).
11 |
12 | {% asset_img screenshot.png Track outbound link as goal for A/B tests %}
13 |
14 | ## Setup Outbound Link Tracking
15 |
16 | 1. In the content editor, find the A/B test you wish to track outbound links.
17 | 2. Open the A/B tests' settings by clicking the cog.
18 | 3. Scroll down in the sidebar and select "Outbound link" under _Testing Goal_.
19 | 4. Enter the URL of the outbound link you want to track.
20 |
21 | Whenever a user click a link on your website which directs the user to this URL, they will be added as a successful conversion of said test.
22 |
--------------------------------------------------------------------------------
/blog/source/_posts/track-outbound-links/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/_posts/track-outbound-links/screenshot.png
--------------------------------------------------------------------------------
/blog/source/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JJJ/ab-testing-for-wp/7a2d47487afa6aebc640d5c99817d0c9d69d16f5/blog/source/favicon.ico
--------------------------------------------------------------------------------
/blog/themes/ab-testing-for-wp/_config.yml:
--------------------------------------------------------------------------------
1 | node_sass:
2 | outputStyle: compressed
3 |
--------------------------------------------------------------------------------
/blog/themes/ab-testing-for-wp/layout/archive.ejs:
--------------------------------------------------------------------------------
1 | <%- partial('partials/header') %>
2 | 17 | <%= theme.excerpt_link %> 18 |
19 | <% } %> 20 | <% } else { %> 21 | <%- post.content %> 22 | <% } %> 23 |{`[ab-test id=${postId}]`}
47 | 68 | {__('Which variant do you want to declare a winner?', 'ab-testing-for-wp')} 69 |
70 |89 | {sprintf(__('Do you want to declare variant "%s" as the winner?', 'ab-testing-for-wp'), selectedVariant.name)} 90 |
91 |92 | {__('This will remove the test and place the winning variant in its place.', 'ab-testing-for-wp')} 93 |
94 |95 | {__('The test will be removed!', 'ab-testing-for-wp')} 96 |
97 |32 |
37 | 38 | 39 |