Bug: Double browser.search.ad_clicks on telemetry for duckduckgo
Status: VERIFIED
Priority: P2
Resolution: FIXED
Created: 2020-07-08 15:00:24+00:00
Resolved: 2020-10-07 13:19:37+00:00

Sometimes, depending on the add, if i click on it, i get double count for browser.search.ad_clicks in about:Telemetry using duckduckgo as default.


**Tested on**
Windows10 64bit, Ubuntu 18.04 64bit and Macos 10.15

**Using** Firefox 78.0.1
                Firefox nightly 80.0a1
                Firefox beta 79.0b4


**steps to reproduce**
1) download firefox beta EN_US localized
2) launch new profile
3) go to about:preferences#search
4) Set duckduckgo as default engine
5) enable add search bar in toolbar
6) search in searchbar something like "compra samsung galaxy"
7) click on the AD at the right part of the screen ( it should have  a circle with the word AD)
8) check in about:telemetry  > raw json >raw data > "browser.search.ad_clicks"
9) Repeat steps searching in about:newtab as the issue is also visible in duckduckgo search field in about:newtab

**Actual result**
 i get  "duckduckgo": 2   in "browser.search.ad_clicks"

**Expected result**
 i should get  "duckduckgo": 1  in "browser.search.ad_clicks"




**Notes**

**Windows10  (Nightly) FAILED**
clicked :
https://duckduckgo.com/y.js?ad_provider=bingv7aa&u3=https%3A%2F%2Fwww.bing.com%2Faclick%3Fld%3De87lbB5ZfwU7SANS7C48a2qzVUCUxlp38H_RmVoCe7w1FJGF%2Db0ewp7Le2MSlutmyGoJJpd3zmQ6zrg5AvZ7lkDdfAhE_csr00FMsHrbBEi9S8B3S6HEACR5WRyTwjk7zbD70tGnmfj4wxHHQpxQgfRJpsUiMDI4wX7zrM%2DSElAdJCMi0t%26u%3DaHR0cHMlM2ElMmYlMmZ3d3cuY2VsbHBob25lY2FzZXMuY29tJTJmU2Ftc3VuZy1HYWxheHktQTEwLmh0bWw%26rlid%3D2320a02913251e6cab55ff2cd9c0178b&vqd=3-313428922816339075243141731486420986394-129511594297945399104254315999566985909&iurl=%7B1%7DIG%3D57A2DB092E574FFBBE17687EA9D5FB1D%26CID%3D1C068FAB357E6CC7276780AA34C16D68%26ID%3DDevEx%2C5712.1

telemetry
   "brow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JTNhMTQlM2ElNWIqQ2FtcGFpZ25JRColNWQlM2ElNWIqc2VhcmNodGVybSolNWQlM2ElNWIqS2V5d29yZElEKiU1ZCUyNm1zY2xraWQlM2Q3N2NkM2M2MWMwODkxNGExYzgxYzYzNjQwYjUzMGYzMg%26rlid%3D77cd3c61c08914a1c81c63640b530f32&vqd=3-322217318422189542944266468040799440074-30811707292364766489686347458170368978

**Windows10  (RELEASE) WORKED OK**
https://duckduckgo.com/y.js?ad_provider=bingv7aa&u3=https%3A%2F%2Fwww.bing.com%2Faclick%3Fld%3De8P7X7I_Wrbk%2DuGyoXBmrekDVUCUzUirdCVhcGsk1e9NoGNJIWbkOxszefsTcH5NV3urU9xGzwFh%2DN%2DSnj6mL737odFuso%2D6LgD7axUVI9J5AbdQwbxbWiGwvGXWqpkVjaF1uOAXnXiWaQmBavF49Xg1ZOTOkNgH2pQmY8ypOxQNHsTeas%26u%3DaHR0cHMlM2ElMmYlMmZhZC5kb3VibGVjbGljay5uZXQlMmZkZG0lMmZ0cmFja2NsayUyZk4zMTU4Lmdvb2dsZSUyZkIyMTc0ODQ2Ni4yMjk4MTQxNTMlM2JkY190cmtfYWlkJTNkNDI3ODM3Mzk4JTNiZGNfdHJrX2NpZCUzZDEwNjQ1MjU3NiUzYmRjX2xhdCUzZCUzYmRjX3JkaWQlM2QlM2J0YWdfZm9yX2NoaWxkX2RpcmVjdGVkX3RyZWF0bWVudCUzZCUzYnRmdWElM2QlM2ZodHRwJTNhJTJmJTJmdHJhY2tpbmcuZGVlcHNlYXJjaC5hZGx1Y2VudC5jb20lMmZhZGx1Y2VudCUyZlJlZGlyZWN0b3IlM2Zrd2lkJTNkZGF0LTIzMzAwNzEyOTc3NDQzNDElM2Fsb2MtOHgxMjUyMzQ0MjM2MTY1ODMzeDM5NjA1MDUxOCUyNmFkaWQlM2QlMjZkZXZpY2UlM2RjJTI2bG9jYXRpb24lM2Q0NDQlMjZyZXRhaWxlciUzZHN0YXBsZXMlMjZ1cmwlM2RodHRwcyUzYSUyZiUyZnd3dy5zdGFwbGVzLmNvbSUyZnNhbXN1bmctZ2FsYXh5LXM4LTY0Z2ItdW5sb2NrZWQtZ3NtLXBob25lLWFydGljLXNpbHZlci1nOTU1ZiUyZnByb2R1Y3RfMjQyNzQ3NjglMjZjaWQlM2RQUyUzYUdTJTNhU0JEJTNhT1MlM2FiJTNhMTQlM2ElNWIqQ2FtcGFpZ25JRColNWQlM2ElNWIqc2VhcmNodGVybSolNWQlM2ElNWIqS2V5d29yZElEKiU1ZCUyNm1zY2xraWQlM2QzYTg1Y2M3ZDVkNjAxYTU3ODY5ZjkzNzg5MTA2Y2MyZg%26rlid%3D3a85cc7d5d601a57869f93789106cc2f&vqd=3-273096020486359162716092231799217443560-86116826474896349930247259640857000647




**Ubuntu BETA FAILED**
CLICKED:
https://duckduckgo.com/y.js?ad_provider=bingv7aa&u3=https%3A%2F%2Fwww.bing.com%2Faclick%3Fld%3De89ZxLFyt0cYuv2UNAfnu9zzVUCUx9SZi55isUL6MBhtr%2DE3KjIWuMZGiAqo8hjsF7tV%2D7P4f1fng6eaOdNZSI1XG0f9qiowRm8YazVYGe7zZuM8KIGXmy%2DVXePLtHi%2DCHvXuGbtvi4xnY3WHolFrsN%2DxnXRQorFO1wBAt0WlOaYtAOTOJ%26u%3DaHR0cHMlM2ElMmYlMmZhZC5kb3VibGVjbGljay5uZXQlMmZkZG0lMmZ0cmFja2NsayUyZk4zMTU4Lmdvb2dsZSUyZkIyMTc0ODQ2Ni4yMjk4MTQxNTMlM2JkY190cmtfYWlkJTNkNDI3ODM3Mzk4JTNiZGNfdHJrX2NpZCUzZDEwNjQ1MjU3NiUzYmRjX2xhdCUzZCUzYmRjX3JkaWQlM2QlM2J0YWdfZm9yX2NoaWxkX2RpcmVjdGVkX3RyZWF0bWVudCUzZCUzYnRmdWElM2QlM2ZodHRwJTNhJTJmJTJmdHJhY2tpbmcuZGVlcHNlYXJjaC5hZGx1Y2VudC5jb20lMmZhZGx1Y2VudCUyZlJlZGlyZWN0b3IlM2Zrd2lkJTNkZGF0LTIzMzAwNzEyOTc3NDQzNDElM2Fsb2MtOHgxMjUyMzQ0MjM2MTY1ODMzeDM5NjA1MDUxOCUyNmFkaWQlM2QlMjZkZXZpY2UlM2RjJTI2bG9jYXRpb24lM2Q0NDQlMjZyZXRhaWxlciUzZHN0YXBsZXMlMjZ1cmwlM2RodHRwcyUzYSUyZiUyZnd3dy5zdGFwbGVzLmNvbSUyZnNhbXN1bmctZ2FsYXh5LXM4LTY0Z2ItdW5sb2NrZWQtZ3NtLXBob25lLWFydGljLXNpbHZlci1nOTU1ZiUyZnByb2R1Y3RfMjQyNzQ3NjglMjZjaWQlM2RQUyUzYUdTJTNhU0JEJTNhT1MlM2FiJTNhMTQlM2ElNWIqQ2FtcGFpZ25JRColNWQlM2ElNWIqc2VhcmNodGVybSolNWQlM2ElNWIqS2V5d29yZElEKiU1ZCUyNm1zY2xraWQlM2Q1OGU3YWRiMzA0ZDUxZGExYzI0OWYyYjZjYjZjZGI5MQ%26rlid%3D58e7adb304d51da1c249f2b6cb6cdb91&vqd=3-160410337024953905117722165648800736450-168903093874096269254091980444880504662&iurl=%7B1%7DIG%3D0F277F910E03420A9633A3F9C4E4CBB7%26CID%3D1EC103103B74664814720C113ACB6795%26ID%3DDevEx%2C5710.1


"browser.search.ad_clicks": {
"duckduckgo": 2



**Ubuntu nightly WORKED OK**
CLICKED:
https://duckduckgo.com/y.js?ad_provider=bingv7aa&u3=https%3A%2F%2Fwww.bing.com%2Faclick%3Fld%3De88pZXfyudvIobdFBS3RKM_zVUCUwW4lYv81O9fEV9rUjOvw_73kUwzLwE1Kg%2Dk_h4IkZWMQFSHCu4QLQtmQrtw7jxK0lrUZyDqIYwGiL0mZ781uy4ULfiDV4avmD34YRDtJ6taHKXiS%2DVdjHcn9VEDXAVlIWbLHVoD6%2Dh3CCcYM_zHrZp%26u%3DaHR0cHMlM2ElMmYlMmZ3d3cub25lY2xpY2tyb290LmNvbSUyZnNhbXN1bmctZ2FsYXh5LXM0LWFjdGl2ZTElMmYlM2Ztc2Nsa2lkJTNkMmEzMTA2ZTI3OWY5MTY3MzhiMTU1OWU3YjZkODUyZTglMjZ1dG1fc291cmNlJTNkYmluZyUyNnV0bV9tZWRpdW0lM2RjcGMlMjZ1dG1fY2FtcGFpZ24lM2RSb290JTI1MjBNYXNzJTI1MjBEZXZpY2UlMjUyMExpc3QlMjUyMCUyNTIzMiUyNnV0bV90ZXJtJTNkZ2FsYXh5JTI1MjBzNCUyNnV0bV9jb250ZW50JTNkRHluYW1pYw%26rlid%3D2a3106e279f916738b1559e7b6d852e8&vqd=3-37941557093867943565622031716811706126-237862121524119731152075992514006334845


browser.search.ad_clicks": {
"duckduckgo": 1



**Ubuntu release WORKED OK**
CLICKED:
https://duckduckgo.com/y.js?ad_provider=bingv7aa&u3=https%3A%2F%2Fwww.bing.com%2Faclick%3Fld%3De8Xd8cYk0fAt6MdZcv2LqtbzVUCUz_nwvBAVC1BeBIrOVCPDeKk8I9Gax98ve1%2Dw3U1z9sZ31lTefHJI18ZBCC_WU7X_B53T7eDA82PunOPFIEbidtTz0c70cs4mUWM17%2D4qDMCwoRo_ZcIBUuaOtBGqoR8u2_1RWCkTsqBUxh8eN0hzrh%26u%3DaHR0cHMlM2ElMmYlMmZ3d3cuY2VsbHBob25lY2FzZXMuY29tJTJmU2Ftc3VuZy1HYWxheHktQTEwLmh0bWw%26rlid%3Df0f463fbc34413b866273cfe0d2a6028&vqd=3-79893481702025976512858044946576467465-143129695157389247238999991278731657251


browser.search.ad_clicks": {
"duckduckgo": 1



**On mac 10.15 **
Beta failed, 
Nightly worked,
release worked