Give a condition to a wordpress menu item to change its offerid for each landing page I create

What about using jQuery to insert the unique code to your CTA menu class or item ID? Something like:

    // generate your unique codes in jQuery
    var mycode = your_random_code_function() // or an array of codes
    // then…
    var myhref = $("body.landingpage .navbar-nav .cta a").attr("href"); 
    $("body.landingpage .navbar-nav .cta a").attr("href", myhref + "?offerid=" + mycode);
    // etc…
    // add the .cta class to the menu item that needs a code via Appearance > Menus in WP
    // or just use its WP generated ID

Otherwise I think you’d have to look at a custom walker class.