Injecting script on app installation in the shopify store

I want that whenever a merchant installs my app on their store.. a script tag is added to the product details page, cart page and checkout page. So, does anyone have any idea how this can be done..