A team modeled recurring visits to various city locations using billions of mobile phone datapoints across four continents.
Four men arrived in a Ford saloon car at a beachside bar around noon on Sunday, according to a waiter at the establishment, before launching the attack that killed 18 people.
This is the third time in recent months that the North African-based group al Qaeda in the Islamic Maghreb has claimed responsibility for an attack on soft targets in West Africa.
Gunmen reportedly entered a popular beach resort in Grand Bassam on the Ivory Coast on Sunday and opened fire, according to news agencies. The number of casualties is unclear.
Authorities say they have discovered the mutilated bodies of 25 children since December, in what many fear to be a rash of ritual killings.