Activity QA bookmarklet activity-qa-bookmarklet

On this page: Learn how to use the Target QA bookmarklet to exit Activity QA mode and view your site like a typical visitor.

After you browse a website in QA mode, QA mode persists across pages until your Target session expires. A bookmarklet is a browser bookmark that runs JavaScript. The Target QA bookmarklet forces Target to release you from QA mode, so you do not have to wait for the session to expire. Use the version that matches the at.js version deployed on your site.

NOTE
The process to create a bookmarklet varies by browser type and version. Consult the help of your browser or search on the Internet for specific directions.

Activity QA bookmarklet for at.js 1.x

To use the Target QA bookmarklet, create a bookmarklet containing the following JavaScript code and add it to the Bookmarks Toolbar of your browser:

javascript:(
    function () {
        if (window.location.href.indexOf('?') != -1) {
            var parts = window.location.href.split('at_preview_token',2);
            if (parts.length > 1) {
                window.location.href = parts[0].concat('at_preview_token=');
            } else {
                window.location.href = window.location.href.concat("&at_preview_token=")
            }
        } else {
            window.location.href = window.location.href.concat("?at_preview_token=")
        }
    }
)();

You can also manually force yourself out of QA mode by loading a page on your site with the at_preview_token parameter set to an empty value. For example:

https://www.mysite.com/?at_preview_token=

Activity QA bookmarklet for at.js 2.x

In contrast to at.js 1.x, at.js 2.x does not support third-party cookies. QA mode persists only for the first-party domain, by means of a first-party cookie set by at.js. As a result, the QA mode session is managed only on the client side, and no QA mode cookies are sent to Target.

To use the Target QA bookmarklet, create a bookmarklet containing the following JavaScript code and add it to the Bookmarks Toolbar of your browser:

javascript:(
    function () {
        var AT_QA_MODE = 'at_qa_mode=';
        var isSet = document.cookie.split(';').some(function (cookie) {
            return cookie.trim().startsWith(AT_QA_MODE);
        });
        if (isSet) {
            document.cookie = AT_QA_MODE + ';domain='+window.location.hostname+";Path=/; Max-Age=-0;";
            var token = window.location.href.indexOf("?at_preview_token")<0? "&at_preview_token" : "?at_preview_token";
            var url = window.location.href.split(token,2)[0];
            window.open(url, '_self', 'noreferrer');
        }
    })();

Use the Activity QA bookmarklet

After you add the bookmarklet that matches your at.js version to your browser, use it whenever you want to leave QA mode:

  1. Open any page of your site while you are in QA mode.
  2. Click the bookmarklet in the Bookmarks Toolbar of your browser.
  3. Load a page of your site. Target releases the session from QA mode, and the site displays as it does for a typical visitor.
AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: The Target QA bookmarklet forces Target to release you from QA mode so that you can view your site like a typical visitor without waiting for your Target session to expire.

Intents:

  • Exit Activity QA mode and view your site like a typical visitor.
  • Choose the bookmarklet version that matches the at.js version deployed on your site (at.js 1.x or at.js 2.x).
  • Create a bookmarklet and add it to the Bookmarks Toolbar of your browser.
  • With at.js 1.x, leave QA mode manually by loading a page of your site with the at_preview_token parameter set to an empty value.

Glossary:

  • Bookmarklet: a browser bookmark that runs JavaScript.

Terminology:

  • Canonical name: Activity QA bookmarklet
  • Variants: Target QA bookmarklet; Activity QA bookmarklet for at.js 1.x; Activity QA bookmarklet for at.js 2.x
  • Synonyms: “Activity QA mode” = “QA mode”

FAQ:

  • How long does QA mode persist after I browse a website in QA mode? QA mode persists across pages until your Target session expires.
  • How do I leave QA mode without waiting for the Target session to expire? Use the Target QA bookmarklet, which forces Target to release you from QA mode.
  • Which version of the Target QA bookmarklet should I use? Use the version that matches the at.js version deployed on your site.
  • With at.js 1.x, can I leave QA mode without the bookmarklet? Yes, you can also manually force yourself out of QA mode by loading a page on your site with the at_preview_token parameter set to an empty value.
  • Does the way to create a bookmarklet depend on the browser? Yes, the process to create a bookmarklet varies by browser type and version, so consult the help of your browser or search on the Internet for specific directions.

Examples:

  • https://www.mysite.com/?at_preview_token= is an example of a page URL on your site with the at_preview_token parameter set to an empty value, which manually forces you out of QA mode (at.js 1.x).

Related pages:

  • Browsing a website in QA mode, after which QA mode persists across pages until your Target session expires: QA mode (c-activities/c-activity-qa/activity-qa.md)

Personas:

  • marketer: Can leave QA mode with the bookmarklet that matches your at.js version, once it is added to your browser. Open any page of your site while you are in QA mode, use the bookmarklet in the Bookmarks Toolbar of your browser, then load a page of your site. Where: “Use the Activity QA bookmarklet”.
  • developer: Can also, with at.js 1.x, manually force yourself out of QA mode by loading a page on your site with the at_preview_token parameter set to an empty value. Where: “FAQ”.

Onboarding:

  • Level: Intermediate
  • First minimal step: After you add the bookmarklet that matches your at.js version to your browser, open any page of your site while you are in QA mode.
  • Success check: After you use the bookmarklet and load a page of your site, Target releases the session from QA mode, and the site displays as it does for a typical visitor.
  • Previous: Browsing a website in QA mode before you leave it: QA mode (c-activities/c-activity-qa/activity-qa.md)
recommendation-more-help
target-help-main