You can use menu_link_attributes and edit linkbelow code to set attributes. ThereThis will beadd an optionattribute to add attributesall links in the page. But make sure to each menu you savedadd the condition check for your URL.
Hope this helps.
/**
* Implements template_preprocess_menu().
*/
function THEME_preprocess_menu(&$variables) {
foreach ($variables['items'] as $item) {
$item['attributes']->setAttribute('data-target', 'YOUR TARGET NAME');
}
}