There is no true way at this time to use Feature Stapling with SharePoint Online, which would let you customize the default template and solution for new site collections, including My Sites, but there are some workarounds we can use to get close to the same functionality. Below I’ve outlined a few use cases which can provide some functionality similar to Feature Stapling, allowing for the same effect in some cases with a little extra work.
Use Template for Root Site
When you create a new site collection in SharePoint Online, you must specify the template you want to use. The ‘Collaboration’ built-in templates will appear first, which is where Feature Stapling would be used in an on-premises SharePoint implementation, as you could set the default template here.
The initially selected “Team Site’ template could be your own version of a site with a custom master page. As noted previously, SharePoint Online does not support this however, so it can be troublesome when you want to create many new site collections based on a template. There is a workaround however, and though it’s not as easy and seamless as Feature Stapling, it does work.
When creating the new site collection, switch to the ‘Custom’ tab in the template selection field. You can then choose to ‘Select template later…’ which will allow you to upload a solution and specify the template at a later time. This basically provisions the Site Collection without a template, and put it into a hold state until the template is specified.
Once you’ve selected this option, and completed the creation of your new site collection, the provisioning process will begin. Once it has been provisioned, you can navigate to your new site collection where you will be greeted by this screen:
SharePoint site templates are saved as solutions, and since solutions are available only within a site collection (not cross-collection), we’ll need to upload the solution, and activate it (this assumes you’ve already saved your site as a template, and have the wsp file available). Simply click the ‘Solution Gallery’ and upload the template solution you’d like to use, Activate it, then navigate back to the URL of the new site collection where you can now see your template under the ‘Custom’ tab.
Now obviously this does not accomplish all the same capabilities as Feature Stapling, but if you put your other customizations such as Master Pages or design files into a Solution or Design Package, you can then deploy those to your other site collections as well, giving you a full level of customization for new site collections (and existing ones, if you use the design package or solution).