Start guide
›
FAQ
›
Questions when using the service
How can I set HTML conditions?
HTML condition targeting is a function that allows you to specify the text included in the specified HTML element or the value of the value attribute and display the banner only on pages that match the targeting condition.
Example of use)
・ Identify user login / non-login
・ Identify products in cart
・ Identify the user’s member information (however, only the member information described in the HTML element)
Specific setting method
(1) First, check “Use” for targeting by HTML elements.

(2) Specify the target HTML element in the CSS selector format. Please refer to the following page for the CSS selector format description method.
How to write CSS selector
(3) Specify the text or value attribute to be included in the HTML element in the “Search string” and “Judgment method” items. We recommend “phrase match” or “regular expression match” as the judgment method.
Setting Example
For example, consider the following HTML element:
<li class="login">login</li>
If you want to target when this HTML element exists in the page, the settings are as follows.

Target HTML element: .login
Search string: Login
Judgment method: Phrase match
How to check a string contained in an HTML element using a function
As a method to check whether the set contents are correct, you can use a function to check the character string contained in the HTML element. The confirmation method is as follows.
(1) Open the page you want to target in chrome, and open the developer tools.
(2) Open the Console screen of the developer tool.
(3) Enter the following function into the console and execute it.
document.querySelector("Element to be specified").innerText
Enter the target HTML element in the CSS selector format in the “Element to be specified” section.
If the function is executed successfully, the following result is displayed.

###
Specification method of HTML element when space exists in class name
If there is a space in the class name, such as class="navi sp top", enter “.” In the place where the space enters as shown below.