# Finding Out a Button's CSS Selector

## Why define goals using the selector? <a href="#block-10764b9f845a4990b67f53ba7ec53208" id="block-10764b9f845a4990b67f53ba7ec53208"></a>

Although defining goals using the button text is much easier, sometimes it is not feasible.

1. If there isn't a text on the element you want to define as a goal
2. If the same text is used by multiple different elements on the same page and you only want to select one.

In other cases, we advise non-technical users to define their goals using text.

## How to get the CSS selector of a button <a href="#block-4deb64e8fb3749afb7000d473eee9c86" id="block-4deb64e8fb3749afb7000d473eee9c86"></a>

1. Hover the cursor over the button you want to define as a goal and right-click the mouse to select **Inspect**
2. ![image](https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/1eea72a4-4873-49b8-b564-58a45d79c227/Screen_Shot_2021-11-12_at_16.18.58/w=1080,quality=90,fit=scale-down)
3. Right-click on the highlighted code. Select **Copy** > **Copy selector**
4. ![image](https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/9f3815c0-91c2-4a46-b01f-2001f09a6ffa/Screen_Shot_2021-11-12_at_16.19.25/w=1080,quality=90,fit=scale-down)
5. Paste it into the 'Click with Selector' input in the Goals tab of your dashboard
6. ![image](https://images.spr.so/cdn-cgi/imagedelivery/j42No7y-dcokJuNgXeA0ig/b4e6ff61-c275-4bb3-9f27-bc67cd2a5069/Screen_Shot_2021-11-12_at_16.20.22/w=1920,quality=90,fit=scale-down)
