What is the best approach for setting up a goal to measure the success of a component test within Sitecore? Let's say I have two components in my test and they have a different colored button. I have both buttons linking to the same page so how can I tell what button was clicked more (what variant was more successful for my test)? Do I need the buttons to link to different pages (just a copy of the original page) with separate goals? Also, how can I differentiate clicks from my test vs someone just visiting the page?
Leave it as a single page with a goal associated. Then...
Create a new version of the component with the second color (if you are an admin user create a new version of the page first to ensure you trigger draft workflow state)
Submit through workflow
Approver should choose "approve with test" to trigger mvt dialog.
Follow prompts to create the test of the two buttons.
Edit: just noticed sestocker gave the same basic info in comments. If he can create an answer rather than comment give him the credit as he was first.