Industry 4.0 technologies, originally developed in the manufacturing sector, can be purposefully implemented to improve City Logistics (CL) processes by automatizing some of their operational tasks and enabling real-time exchange of information, with the ultimate goal of providing better interconnection among the actors involved. This work aims to identify the main social and economic contextual drivers for investing in the application of Industry 4.0 technologies to urban logistics. To this end, a dataset based on the primary collection of 105 CL projects exploiting the main 4.0 technologies has been built. After that, a regression model has been completed including potential economic, strategic, and demographic determinants of investments in CL 4.0. According to the obtained outcomes, Gross Domestic Product, Foreign Direct Investments, Research and Development Expenditure, Employment Rate, and Number of Inhabitants are significant contextual factors for the adoption of Industry 4.0 technologies in last mile logistics. The study might support academicians to investigate novel application fields of Industry 4.0 technologies. Also, it can serve as a roadmap for orienting the investments of private organizations and public entities to promote CL innovation and digitalization. Moreover, Industry 4.0 technology providers might find this study interesting to uncover prospective business sectors and markets. Future research efforts will analyse the impacts of internal business factors on CL 4.0 and the satisfaction levels of urban logistics stakeholders.